

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>ryu.app.ofctl_rest &mdash; Ryu 4.34 documentation</title>
  

  
  
  
  

  
  <script type="text/javascript" src="../_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
        <script type="text/javascript" src="../_static/jquery.js"></script>
        <script type="text/javascript" src="../_static/underscore.js"></script>
        <script type="text/javascript" src="../_static/doctools.js"></script>
        <script type="text/javascript" src="../_static/language_data.js"></script>
        
    
    <script type="text/javascript" src="../_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="ryu.app.rest_vtep" href="rest_vtep.html" />
    <link rel="prev" title="ryu.app.ofctl" href="ofctl.html" /> 

<!-- RTD Extra Head -->



<script type="application/json" id="READTHEDOCS_DATA">{"ad_free": false, "api_host": "https://readthedocs.org", "build_date": "2022-06-09T23:10:30Z", "builder": "sphinx", "canonical_url": null, "commit": "d6cda4f4", "docroot": "/doc/source/", "features": {"docsearch_disabled": false}, "global_analytics_code": "UA-17997319-1", "language": "en", "page": "app/ofctl_rest", "programming_language": "words", "project": "ryu", "proxied_api_host": "/_", "source_suffix": ".rst", "subprojects": {}, "theme": "sphinx_rtd_theme", "user_analytics_code": "", "version": "latest"}</script>

<!--
Using this variable directly instead of using `JSON.parse` is deprecated.
The READTHEDOCS_DATA global variable will be removed in the future.
-->
<script type="text/javascript">
READTHEDOCS_DATA = JSON.parse(document.getElementById('READTHEDOCS_DATA').innerHTML);
</script>



<!-- end RTD <extrahead> -->
<script async type="text/javascript" src="/_/static/javascript/readthedocs-addons.js"></script><meta name="readthedocs-project-slug" content="ryu" /><meta name="readthedocs-version-slug" content="latest" /><meta name="readthedocs-resolver-filename" content="/app/ofctl_rest.html" /><meta name="readthedocs-http-status" content="200" /></head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="../index.html" class="icon icon-home"> Ryu
          

          
          </a>

          
            
            
            
              <div class="version">
                latest
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../getting_started.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="../developing.html">Writing Your Ryu Application</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration.html">Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tests.html">Tests</a></li>
<li class="toctree-l1"><a class="reference internal" href="../snort_integrate.html">Snort Intergration</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../app.html">Built-in Ryu applications</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="ofctl.html">ryu.app.ofctl</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">ryu.app.ofctl_rest</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#retrieve-the-switch-stats">Retrieve the switch stats</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#get-all-switches">Get all switches</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-the-desc-stats">Get the desc stats</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-all-flows-stats">Get all flows stats</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-flows-stats-filtered-by-fields">Get flows stats filtered by fields</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-aggregate-flow-stats">Get aggregate flow stats</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-aggregate-flow-stats-filtered-by-fields">Get aggregate flow stats filtered by fields</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-table-stats">Get table stats</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-table-features">Get table features</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-ports-stats">Get ports stats</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-ports-description">Get ports description</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-queues-stats">Get queues stats</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-queues-config">Get queues config</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-queues-description">Get queues description</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-groups-stats">Get groups stats</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-group-description-stats">Get group description stats</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-group-features-stats">Get group features stats</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-meters-stats">Get meters stats</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-meter-config-stats">Get meter config stats</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-meter-description-stats">Get meter description stats</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-meter-features-stats">Get meter features stats</a></li>
<li class="toctree-l4"><a class="reference internal" href="#get-role">Get role</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#update-the-switch-stats">Update the switch stats</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#add-a-flow-entry">Add a flow entry</a></li>
<li class="toctree-l4"><a class="reference internal" href="#modify-all-matching-flow-entries">Modify all matching flow entries</a></li>
<li class="toctree-l4"><a class="reference internal" href="#modify-flow-entry-strictly">Modify flow entry strictly</a></li>
<li class="toctree-l4"><a class="reference internal" href="#delete-all-matching-flow-entries">Delete all matching flow entries</a></li>
<li class="toctree-l4"><a class="reference internal" href="#delete-flow-entry-strictly">Delete flow entry strictly</a></li>
<li class="toctree-l4"><a class="reference internal" href="#delete-all-flow-entries">Delete all flow entries</a></li>
<li class="toctree-l4"><a class="reference internal" href="#add-a-group-entry">Add a group entry</a></li>
<li class="toctree-l4"><a class="reference internal" href="#modify-a-group-entry">Modify a group entry</a></li>
<li class="toctree-l4"><a class="reference internal" href="#delete-a-group-entry">Delete a group entry</a></li>
<li class="toctree-l4"><a class="reference internal" href="#modify-the-behavior-of-the-port">Modify the behavior of the port</a></li>
<li class="toctree-l4"><a class="reference internal" href="#add-a-meter-entry">Add a meter entry</a></li>
<li class="toctree-l4"><a class="reference internal" href="#modify-a-meter-entry">Modify a meter entry</a></li>
<li class="toctree-l4"><a class="reference internal" href="#delete-a-meter-entry">Delete a meter entry</a></li>
<li class="toctree-l4"><a class="reference internal" href="#modify-role">Modify role</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#support-for-experimenter-multipart">Support for experimenter multipart</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#send-a-experimenter-message">Send a experimenter message</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="#reference-description-of-match-and-actions">Reference: Description of Match and Actions</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#description-of-match-on-request-messages">Description of Match on request messages</a></li>
<li class="toctree-l4"><a class="reference internal" href="#description-of-actions-on-request-messages">Description of Actions on request messages</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="rest_vtep.html">ryu.app.rest_vtep</a></li>
<li class="toctree-l2"><a class="reference internal" href="bgp_application.html">ryu.services.protocols.bgp.application</a></li>
</ul>
</li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../index.html">Ryu</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../index.html">Docs</a> &raquo;</li>
        
          <li><a href="../app.html">Built-in Ryu applications</a> &raquo;</li>
        
      <li>ryu.app.ofctl_rest</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            
              <a href="https://github.com/faucetsdn/ryu/blob/master/doc/source/app/ofctl_rest.rst" class="fa fa-github"> Edit on GitHub</a>
            
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="ryu-app-ofctl-rest">
<h1><a class="toc-backref" href="#id10">ryu.app.ofctl_rest</a><a class="headerlink" href="#ryu-app-ofctl-rest" title="Permalink to this headline">¶</a></h1>
<p>ryu.app.ofctl_rest provides REST APIs for retrieving the switch stats
and Updating the switch stats.
This application helps you debug your application and get various statistics.</p>
<p>This application supports OpenFlow version 1.0, 1.2, 1.3, 1.4 and 1.5.</p>
<div class="contents topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#ryu-app-ofctl-rest" id="id10">ryu.app.ofctl_rest</a><ul>
<li><a class="reference internal" href="#retrieve-the-switch-stats" id="id11">Retrieve the switch stats</a><ul>
<li><a class="reference internal" href="#get-all-switches" id="id12">Get all switches</a></li>
<li><a class="reference internal" href="#get-the-desc-stats" id="id13">Get the desc stats</a></li>
<li><a class="reference internal" href="#get-all-flows-stats" id="id14">Get all flows stats</a></li>
<li><a class="reference internal" href="#get-flows-stats-filtered-by-fields" id="id15">Get flows stats filtered by fields</a></li>
<li><a class="reference internal" href="#get-aggregate-flow-stats" id="id16">Get aggregate flow stats</a></li>
<li><a class="reference internal" href="#get-aggregate-flow-stats-filtered-by-fields" id="id17">Get aggregate flow stats filtered by fields</a></li>
<li><a class="reference internal" href="#get-table-stats" id="id18">Get table stats</a></li>
<li><a class="reference internal" href="#get-table-features" id="id19">Get table features</a></li>
<li><a class="reference internal" href="#get-ports-stats" id="id20">Get ports stats</a></li>
<li><a class="reference internal" href="#get-ports-description" id="id21">Get ports description</a></li>
<li><a class="reference internal" href="#get-queues-stats" id="id22">Get queues stats</a></li>
<li><a class="reference internal" href="#get-queues-config" id="id23">Get queues config</a></li>
<li><a class="reference internal" href="#get-queues-description" id="id24">Get queues description</a></li>
<li><a class="reference internal" href="#get-groups-stats" id="id25">Get groups stats</a></li>
<li><a class="reference internal" href="#get-group-description-stats" id="id26">Get group description stats</a></li>
<li><a class="reference internal" href="#get-group-features-stats" id="id27">Get group features stats</a></li>
<li><a class="reference internal" href="#get-meters-stats" id="id28">Get meters stats</a></li>
<li><a class="reference internal" href="#get-meter-config-stats" id="id29">Get meter config stats</a></li>
<li><a class="reference internal" href="#get-meter-description-stats" id="id30">Get meter description stats</a></li>
<li><a class="reference internal" href="#get-meter-features-stats" id="id31">Get meter features stats</a></li>
<li><a class="reference internal" href="#get-role" id="id32">Get role</a></li>
</ul>
</li>
<li><a class="reference internal" href="#update-the-switch-stats" id="id33">Update the switch stats</a><ul>
<li><a class="reference internal" href="#add-a-flow-entry" id="id34">Add a flow entry</a></li>
<li><a class="reference internal" href="#modify-all-matching-flow-entries" id="id35">Modify all matching flow entries</a></li>
<li><a class="reference internal" href="#modify-flow-entry-strictly" id="id36">Modify flow entry strictly</a></li>
<li><a class="reference internal" href="#delete-all-matching-flow-entries" id="id37">Delete all matching flow entries</a></li>
<li><a class="reference internal" href="#delete-flow-entry-strictly" id="id38">Delete flow entry strictly</a></li>
<li><a class="reference internal" href="#delete-all-flow-entries" id="id39">Delete all flow entries</a></li>
<li><a class="reference internal" href="#add-a-group-entry" id="id40">Add a group entry</a></li>
<li><a class="reference internal" href="#modify-a-group-entry" id="id41">Modify a group entry</a></li>
<li><a class="reference internal" href="#delete-a-group-entry" id="id42">Delete a group entry</a></li>
<li><a class="reference internal" href="#modify-the-behavior-of-the-port" id="id43">Modify the behavior of the port</a></li>
<li><a class="reference internal" href="#add-a-meter-entry" id="id44">Add a meter entry</a></li>
<li><a class="reference internal" href="#modify-a-meter-entry" id="id45">Modify a meter entry</a></li>
<li><a class="reference internal" href="#delete-a-meter-entry" id="id46">Delete a meter entry</a></li>
<li><a class="reference internal" href="#modify-role" id="id47">Modify role</a></li>
</ul>
</li>
<li><a class="reference internal" href="#support-for-experimenter-multipart" id="id48">Support for experimenter multipart</a><ul>
<li><a class="reference internal" href="#send-a-experimenter-message" id="id49">Send a experimenter message</a></li>
</ul>
</li>
<li><a class="reference internal" href="#reference-description-of-match-and-actions" id="id50">Reference: Description of Match and Actions</a><ul>
<li><a class="reference internal" href="#description-of-match-on-request-messages" id="id51">Description of Match on request messages</a></li>
<li><a class="reference internal" href="#description-of-actions-on-request-messages" id="id52">Description of Actions on request messages</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="retrieve-the-switch-stats">
<h2><a class="toc-backref" href="#id11">Retrieve the switch stats</a><a class="headerlink" href="#retrieve-the-switch-stats" title="Permalink to this headline">¶</a></h2>
<div class="section" id="get-all-switches">
<h3><a class="toc-backref" href="#id12">Get all switches</a><a class="headerlink" href="#get-all-switches" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get the list of all switches which connected to the controller.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="30%" />
<col width="70%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/switches</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Response message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="27%" />
<col width="51%" />
<col width="22%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>1</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/switches
</pre></div>
</div>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="w"></span>
<span class="w">  </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">  </span><span class="mf">2</span><span class="p">,</span><span class="w"></span>
<span class="w">  </span><span class="mf">3</span><span class="w"></span>
<span class="p">]</span><span class="w"></span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The result of the REST command is formatted for easy viewing.</p>
</div>
</div></blockquote>
</div>
<div class="section" id="get-the-desc-stats">
<h3><a class="toc-backref" href="#id13">Get the desc stats</a><a class="headerlink" href="#get-the-desc-stats" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get the desc stats of the switch which specified with Datapath ID in URI.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="27%" />
<col width="73%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/desc/&lt;dpid&gt;</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Response message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="17%" />
<col width="59%" />
<col width="24%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>mfr_desc</td>
<td>Manufacturer description</td>
<td>&quot;Nicira, Inc.&quot;,</td>
</tr>
<tr class="row-even"><td>hw_desc</td>
<td>Hardware description</td>
<td>&quot;Open vSwitch&quot;,</td>
</tr>
<tr class="row-odd"><td>sw_desc</td>
<td>Software description</td>
<td>&quot;2.3.90&quot;,</td>
</tr>
<tr class="row-even"><td>serial_num</td>
<td>Serial number</td>
<td>&quot;None&quot;,</td>
</tr>
<tr class="row-odd"><td>dp_desc</td>
<td>Human readable description of datapath</td>
<td>&quot;None&quot;</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/desc/1
</pre></div>
</div>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="s2">&quot;mfr_desc&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;Nicira, Inc.&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="s2">&quot;hw_desc&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;Open vSwitch&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="s2">&quot;sw_desc&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;2.3.90&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="s2">&quot;serial_num&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;None&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="s2">&quot;dp_desc&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;None&quot;</span><span class="w"></span>
<span class="w">  </span><span class="p">}</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-all-flows-stats">
<span id="id1"></span><h3><a class="toc-backref" href="#id14">Get all flows stats</a><a class="headerlink" href="#get-all-flows-stats" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get all flows stats of the switch which specified with Datapath ID in URI.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="27%" />
<col width="73%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/flow/&lt;dpid&gt;</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Response message body(OpenFlow1.3 or earlier):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="16%" />
<col width="67%" />
<col width="17%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>length</td>
<td>Length of this entry</td>
<td>88</td>
</tr>
<tr class="row-even"><td>table_id</td>
<td>Table ID</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>duration_sec</td>
<td>Time flow has been alive in seconds</td>
<td>2</td>
</tr>
<tr class="row-even"><td>duration_nsec</td>
<td>Time flow has been alive in nanoseconds beyond duration_sec</td>
<td>6.76e+08</td>
</tr>
<tr class="row-odd"><td>priority</td>
<td>Priority of the entry</td>
<td>11111</td>
</tr>
<tr class="row-even"><td>idle_timeout</td>
<td>Number of seconds idle before expiration</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>hard_timeout</td>
<td>Number of seconds before expiration</td>
<td>0</td>
</tr>
<tr class="row-even"><td>flags</td>
<td>Bitmap of OFPFF_* flags</td>
<td>1</td>
</tr>
<tr class="row-odd"><td>cookie</td>
<td>Opaque controller-issued identifier</td>
<td>1</td>
</tr>
<tr class="row-even"><td>packet_count</td>
<td>Number of packets in flow</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>byte_count</td>
<td>Number of bytes in flow</td>
<td>0</td>
</tr>
<tr class="row-even"><td>match</td>
<td>Fields to match</td>
<td>{&quot;in_port&quot;: 1}</td>
</tr>
<tr class="row-odd"><td>actions</td>
<td>Instruction set</td>
<td>[&quot;OUTPUT:2&quot;]</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Response message body(OpenFlow1.4 or later):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="12%" />
<col width="53%" />
<col width="35%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>length</td>
<td>Length of this entry</td>
<td>88</td>
</tr>
<tr class="row-even"><td>table_id</td>
<td>Table ID</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>duration_sec</td>
<td>Time flow has been alive in seconds</td>
<td>2</td>
</tr>
<tr class="row-even"><td>duration_nsec</td>
<td>Time flow has been alive in nanoseconds beyond duration_sec</td>
<td>6.76e+08</td>
</tr>
<tr class="row-odd"><td>priority</td>
<td>Priority of the entry</td>
<td>11111</td>
</tr>
<tr class="row-even"><td>idle_timeout</td>
<td>Number of seconds idle before expiration</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>hard_timeout</td>
<td>Number of seconds before expiration</td>
<td>0</td>
</tr>
<tr class="row-even"><td>flags</td>
<td>Bitmap of OFPFF_* flags</td>
<td>1</td>
</tr>
<tr class="row-odd"><td>cookie</td>
<td>Opaque controller-issued identifier</td>
<td>1</td>
</tr>
<tr class="row-even"><td>packet_count</td>
<td>Number of packets in flow</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>byte_count</td>
<td>Number of bytes in flow</td>
<td>0</td>
</tr>
<tr class="row-even"><td>importance</td>
<td>Eviction precedence</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>match</td>
<td>Fields to match</td>
<td>{&quot;eth_type&quot;: 2054}</td>
</tr>
<tr class="row-even"><td>instructions</td>
<td>struct ofp_instruction_header</td>
<td>[{&quot;type&quot;:GOTO_TABLE&quot;, &quot;table_id&quot;:1}]</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/flow/1
</pre></div>
</div>
<p>Response (OpenFlow1.3 or earlier):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;length&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">88</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;table_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_sec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_nsec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">6.76e+08</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;priority&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">11111</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;idle_timeout&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;hard_timeout&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;flags&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;cookie&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;packet_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;byte_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;match&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;in_port&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="w"></span>
<span class="w">      </span><span class="p">},</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;actions&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;OUTPUT:2&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">]</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
<p>Response (OpenFlow1.4 or later):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">      </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;length&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">88</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;table_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;duration_sec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;duration_nsec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">6.76e+08</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;priority&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">11111</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;idle_timeout&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;hard_timeout&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;flags&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;cookie&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;packet_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;byte_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;match&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;eth_type&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2054</span><span class="w"></span>
<span class="w">        </span><span class="p">},</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;importance&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;instructions&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">          </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;APPLY_ACTIONS&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;actions&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">              </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="s2">&quot;port&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2</span><span class="p">,</span><span class="w"></span>
<span class="w">                </span><span class="s2">&quot;max_len&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">                </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;OUTPUT&quot;</span><span class="w"></span>
<span class="w">              </span><span class="p">}</span><span class="w"></span>
<span class="w">            </span><span class="p">]</span><span class="w"></span>
<span class="w">          </span><span class="p">}</span><span class="w"></span>
<span class="w">        </span><span class="p">]</span><span class="w"></span>
<span class="w">      </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-flows-stats-filtered-by-fields">
<span id="get-flows-stats-filtered"></span><h3><a class="toc-backref" href="#id15">Get flows stats filtered by fields</a><a class="headerlink" href="#get-flows-stats-filtered-by-fields" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get flows stats of the switch filtered by the OFPFlowStats fields.
This is POST method version of <a class="reference internal" href="#get-all-flows-stats"><span class="std std-ref">Get all flows stats</span></a>.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="27%" />
<col width="73%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>POST</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/flow/&lt;dpid&gt;</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Request message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="11%" />
<col width="61%" />
<col width="14%" />
<col width="14%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>table_id</td>
<td>Table ID (int)</td>
<td>0</td>
<td>OFPTT_ALL</td>
</tr>
<tr class="row-odd"><td>out_port</td>
<td>Require matching entries to include this as an output port (int)</td>
<td>2</td>
<td>OFPP_ANY</td>
</tr>
<tr class="row-even"><td>out_group</td>
<td>Require matching entries to include this as an output group (int)</td>
<td>1</td>
<td>OFPG_ANY</td>
</tr>
<tr class="row-odd"><td>cookie</td>
<td>Require matching entries to contain this cookie value (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-even"><td>cookie_mask</td>
<td>Mask used to restrict the cookie bits that must match (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>match</td>
<td>Fields to match (dict)</td>
<td>{&quot;in_port&quot;: 1}</td>
<td>{} #wildcarded</td>
</tr>
<tr class="row-even"><td>priority</td>
<td>Priority of the entry (int) (See Note)</td>
<td>11111</td>
<td>#wildcarded</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">OpenFlow Spec does not allow to filter flow entries by priority,
but when with a large amount of flow entries, filtering by priority
is convenient to get statistics efficiently.
So, this app provides priority field for filtering.</p>
</div>
</div></blockquote>
<dl class="docutils">
<dt>Response message body:</dt>
<dd>The same as <a class="reference internal" href="#get-all-flows-stats"><span class="std std-ref">Get all flows stats</span></a></dd>
</dl>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
     &quot;table_id&quot;: 0,
     &quot;out_port&quot;: 2,
     &quot;cookie&quot;: 1,
     &quot;cookie_mask&quot;: 1,
     &quot;match&quot;:{
         &quot;in_port&quot;:1
     }
 }&#39; http://localhost:8080/stats/flow/1
</pre></div>
</div>
<p>Response (OpenFlow1.3 or earlier):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;length&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">88</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;table_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_sec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_nsec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">6.76e+08</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;priority&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">11111</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;idle_timeout&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;hard_timeout&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;flags&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;cookie&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;packet_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;byte_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;match&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;in_port&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="w"></span>
<span class="w">      </span><span class="p">},</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;actions&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;OUTPUT:2&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">]</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
<p>Response (OpenFlow1.4 or later):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">      </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;length&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">88</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;table_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;duration_sec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;duration_nsec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">6.76e+08</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;priority&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">11111</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;idle_timeout&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;hard_timeout&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;flags&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;cookie&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;packet_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;byte_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;match&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;eth_type&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2054</span><span class="w"></span>
<span class="w">        </span><span class="p">},</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;importance&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;instructions&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">          </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;APPLY_ACTIONS&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;actions&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">              </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="s2">&quot;port&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2</span><span class="p">,</span><span class="w"></span>
<span class="w">                </span><span class="s2">&quot;max_len&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">                </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;OUTPUT&quot;</span><span class="w"></span>
<span class="w">              </span><span class="p">}</span><span class="w"></span>
<span class="w">            </span><span class="p">]</span><span class="w"></span>
<span class="w">          </span><span class="p">}</span><span class="w"></span>
<span class="w">        </span><span class="p">]</span><span class="w"></span>
<span class="w">      </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-aggregate-flow-stats">
<span id="id2"></span><h3><a class="toc-backref" href="#id16">Get aggregate flow stats</a><a class="headerlink" href="#get-aggregate-flow-stats" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get aggregate flow stats of the switch which specified with Datapath ID in URI.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="20%" />
<col width="80%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/aggregateflow/&lt;dpid&gt;</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Response message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="27%" />
<col width="56%" />
<col width="17%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>packet_count</td>
<td>Number of packets in flows</td>
<td>18</td>
</tr>
<tr class="row-even"><td>byte_count</td>
<td>Number of bytes in flows</td>
<td>756</td>
</tr>
<tr class="row-odd"><td>flow_count</td>
<td>Number of flows</td>
<td>3</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/aggregateflow/1
</pre></div>
</div>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;packet_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">18</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;byte_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">756</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;flow_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">3</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-aggregate-flow-stats-filtered-by-fields">
<h3><a class="toc-backref" href="#id17">Get aggregate flow stats filtered by fields</a><a class="headerlink" href="#get-aggregate-flow-stats-filtered-by-fields" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get aggregate flow stats of the switch filtered by the OFPAggregateStats fields.
This is POST method version of <a class="reference internal" href="#get-aggregate-flow-stats"><span class="std std-ref">Get aggregate flow stats</span></a>.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="20%" />
<col width="80%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>POST</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/aggregateflow/&lt;dpid&gt;</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Request message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="11%" />
<col width="61%" />
<col width="14%" />
<col width="14%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>table_id</td>
<td>Table ID (int)</td>
<td>0</td>
<td>OFPTT_ALL</td>
</tr>
<tr class="row-odd"><td>out_port</td>
<td>Require matching entries to include this as an output port (int)</td>
<td>2</td>
<td>OFPP_ANY</td>
</tr>
<tr class="row-even"><td>out_group</td>
<td>Require matching entries to include this as an output group (int)</td>
<td>1</td>
<td>OFPG_ANY</td>
</tr>
<tr class="row-odd"><td>cookie</td>
<td>Require matching entries to contain this cookie value (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-even"><td>cookie_mask</td>
<td>Mask used to restrict the cookie bits that must match (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>match</td>
<td>Fields to match (dict)</td>
<td>{&quot;in_port&quot;: 1}</td>
<td>{} #wildcarded</td>
</tr>
</tbody>
</table>
</div></blockquote>
<dl class="docutils">
<dt>Response message body:</dt>
<dd>The same as <a class="reference internal" href="#get-aggregate-flow-stats"><span class="std std-ref">Get aggregate flow stats</span></a></dd>
</dl>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
     &quot;table_id&quot;: 0,
     &quot;out_port&quot;: 2,
     &quot;cookie&quot;: 1,
     &quot;cookie_mask&quot;: 1,
     &quot;match&quot;:{
         &quot;in_port&quot;:1
     }
 }&#39; http://localhost:8080/stats/aggregateflow/1
</pre></div>
</div>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;packet_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">18</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;byte_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">756</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;flow_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">3</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-table-stats">
<h3><a class="toc-backref" href="#id18">Get table stats</a><a class="headerlink" href="#get-table-stats" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get table stats of the switch which specified with Datapath ID in URI.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="27%" />
<col width="73%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/table/&lt;dpid&gt;</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Response message body(OpenFlow1.0):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="16%" />
<col width="63%" />
<col width="22%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>table_id</td>
<td>Table ID</td>
<td>0</td>
</tr>
<tr class="row-even"><td>name</td>
<td>Name of Table</td>
<td>&quot;classifier&quot;</td>
</tr>
<tr class="row-odd"><td>max_entries</td>
<td>Max number of entries supported</td>
<td>1e+06</td>
</tr>
<tr class="row-even"><td>wildcards</td>
<td>Bitmap of OFPFW_* wildcards that are supported by the table</td>
<td>[&quot;IN_PORT&quot;,&quot;DL_VLAN&quot;]</td>
</tr>
<tr class="row-odd"><td>active_count</td>
<td>Number of active entries</td>
<td>0</td>
</tr>
<tr class="row-even"><td>lookup_count</td>
<td>Number of packets looked up in table</td>
<td>8</td>
</tr>
<tr class="row-odd"><td>matched_count</td>
<td>Number of packets that hit table</td>
<td>0</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Response message body(OpenFlow1.2):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="14%" />
<col width="57%" />
<col width="29%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>table_id</td>
<td>Table ID</td>
<td>0</td>
</tr>
<tr class="row-even"><td>name</td>
<td>Name of Table</td>
<td>&quot;classifier&quot;</td>
</tr>
<tr class="row-odd"><td>match</td>
<td>Bitmap of (1 &lt;&lt; OFPXMT_*) that indicate the
fields the table can match on</td>
<td>[&quot;OFB_IN_PORT&quot;,&quot;OFB_METADATA&quot;]</td>
</tr>
<tr class="row-even"><td>wildcards</td>
<td>Bitmap of (1 &lt;&lt; OFPXMT_*) wildcards that are
supported by the table</td>
<td>[&quot;OFB_IN_PORT&quot;,&quot;OFB_METADATA&quot;]</td>
</tr>
<tr class="row-odd"><td>write_actions</td>
<td>Bitmap of OFPAT_* that are supported
by the table with OFPIT_WRITE_ACTIONS</td>
<td>[&quot;OUTPUT&quot;,&quot;SET_MPLS_TTL&quot;]</td>
</tr>
<tr class="row-even"><td>apply_actions</td>
<td>Bitmap of OFPAT_* that are supported
by the table with OFPIT_APPLY_ACTIONS</td>
<td>[&quot;OUTPUT&quot;,&quot;SET_MPLS_TTL&quot;]</td>
</tr>
<tr class="row-odd"><td>write_setfields</td>
<td>Bitmap of (1 &lt;&lt; OFPXMT_*) header fields that
can be set with OFPIT_WRITE_ACTIONS</td>
<td>[&quot;OFB_IN_PORT&quot;,&quot;OFB_METADATA&quot;]</td>
</tr>
<tr class="row-even"><td>apply_setfields</td>
<td>Bitmap of (1 &lt;&lt; OFPXMT_*) header fields that
can be set with OFPIT_APPLY_ACTIONS</td>
<td>[&quot;OFB_IN_PORT&quot;,&quot;OFB_METADATA&quot;]</td>
</tr>
<tr class="row-odd"><td>metadata_match</td>
<td>Bits of metadata table can match</td>
<td>18446744073709552000</td>
</tr>
<tr class="row-even"><td>metadata_write</td>
<td>Bits of metadata table can write</td>
<td>18446744073709552000</td>
</tr>
<tr class="row-odd"><td>instructions</td>
<td>Bitmap of OFPIT_* values supported</td>
<td>[&quot;GOTO_TABLE&quot;,&quot;WRITE_METADATA&quot;]</td>
</tr>
<tr class="row-even"><td>config</td>
<td>Bitmap of OFPTC_* values</td>
<td>[]</td>
</tr>
<tr class="row-odd"><td>max_entries</td>
<td>Max number of entries supported</td>
<td>1e+06</td>
</tr>
<tr class="row-even"><td>active_count</td>
<td>Number of active entries</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>lookup_count</td>
<td>Number of packets looked up in table</td>
<td>0</td>
</tr>
<tr class="row-even"><td>matched_count</td>
<td>Number of packets that hit table</td>
<td>8</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Response message body(OpenFlow1.3):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="17%" />
<col width="73%" />
<col width="11%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>table_id</td>
<td>Table ID</td>
<td>0</td>
</tr>
<tr class="row-even"><td>active_count</td>
<td>Number of active entries</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>lookup_count</td>
<td>Number of packets looked up in table</td>
<td>8</td>
</tr>
<tr class="row-even"><td>matched_count</td>
<td>Number of packets that hit table</td>
<td>0</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/table/1
</pre></div>
</div>
<p>Response (OpenFlow1.0):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;table_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;lookup_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">8</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;max_entries&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1e+06</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;active_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;name&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;classifier&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;matched_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;wildcards&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;IN_PORT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;DL_VLAN&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">]</span><span class="w"></span>
<span class="w">    </span><span class="p">},</span><span class="w"></span>
<span class="w">    </span><span class="p">...</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;table_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">253</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;lookup_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;max_entries&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1e+06</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;active_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;name&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;table253&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;matched_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;wildcards&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;IN_PORT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;DL_VLAN&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">]</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
<p>Response (OpenFlow1.2):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;apply_setfields&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OFB_IN_PORT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OFB_METADATA&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;match&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OFB_IN_PORT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OFB_METADATA&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;metadata_write&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">18446744073709552000</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;config&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;instructions&quot;</span><span class="o">:</span><span class="p">[</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;GOTO_TABLE&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;WRITE_METADATA&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;table_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;metadata_match&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">18446744073709552000</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;lookup_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">8</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;wildcards&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OFB_IN_PORT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OFB_METADATA&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;write_setfields&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OFB_IN_PORT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OFB_METADATA&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;write_actions&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OUTPUT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;SET_MPLS_TTL&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;name&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;classifier&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;matched_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;apply_actions&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OUTPUT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;SET_MPLS_TTL&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;active_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;max_entries&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1e+06</span><span class="w"></span>
<span class="w">    </span><span class="p">},</span><span class="w"></span>
<span class="w">    </span><span class="p">...</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;apply_setfields&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OFB_IN_PORT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OFB_METADATA&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;match&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OFB_IN_PORT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OFB_METADATA&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;metadata_write&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">18446744073709552000</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;config&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;instructions&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;GOTO_TABLE&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;WRITE_METADATA&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;table_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">253</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;metadata_match&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">18446744073709552000</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;lookup_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;wildcards&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OFB_IN_PORT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OFB_METADATA&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;write_setfields&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OFB_IN_PORT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OFB_METADATA&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;write_actions&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OUTPUT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;SET_MPLS_TTL&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;name&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;table253&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;matched_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;apply_actions&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;OUTPUT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;SET_MPLS_TTL&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;active_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;max_entries&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1e+06</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
<p>Response (OpenFlow1.3):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;active_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;table_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;lookup_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">8</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;matched_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="w"></span>
<span class="w">    </span><span class="p">},</span><span class="w"></span>
<span class="w">    </span><span class="p">...</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;active_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;table_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">253</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;lookup_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;matched_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-table-features">
<h3><a class="toc-backref" href="#id19">Get table features</a><a class="headerlink" href="#get-table-features" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get table features of the switch which specified with Datapath ID in URI.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="79%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/tablefeatures/&lt;dpid&gt;</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Response message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="13%" />
<col width="34%" />
<col width="52%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>table_id</td>
<td>Table ID</td>
<td>0</td>
</tr>
<tr class="row-even"><td>name</td>
<td>Name of Table</td>
<td>&quot;table_0&quot;</td>
</tr>
<tr class="row-odd"><td>metadata_match</td>
<td>Bits of metadata table can match</td>
<td>18446744073709552000</td>
</tr>
<tr class="row-even"><td>metadata_write</td>
<td>Bits of metadata table can write</td>
<td>18446744073709552000</td>
</tr>
<tr class="row-odd"><td>config</td>
<td>Bitmap of OFPTC_* values</td>
<td>0</td>
</tr>
<tr class="row-even"><td>max_entries</td>
<td>Max number of entries supported</td>
<td>4096</td>
</tr>
<tr class="row-odd"><td>properties</td>
<td>struct ofp_table_feature_prop_header</td>
<td>[{&quot;type&quot;: &quot;INSTRUCTIONS&quot;,&quot;instruction_ids&quot;: [...]},...]</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/tablefeatures/1
</pre></div>
</div>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;metadata_write&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">18446744073709552000</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;config&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;table_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;metadata_match&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">18446744073709552000</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;max_entries&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">4096</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;properties&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;INSTRUCTIONS&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;instruction_ids&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">           </span><span class="p">{</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;len&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">4</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="w"></span>
<span class="w">           </span><span class="p">},</span><span class="w"></span>
<span class="w">           </span><span class="p">...</span><span class="w"></span>
<span class="w">          </span><span class="p">]</span><span class="w"></span>
<span class="w">        </span><span class="p">},</span><span class="w"></span>
<span class="w">        </span><span class="p">...</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;name&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;table_0&quot;</span><span class="w"></span>
<span class="w">    </span><span class="p">},</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;metadata_write&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">18446744073709552000</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;config&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;table_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;metadata_match&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">18446744073709552000</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;max_entries&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">4096</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;properties&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;INSTRUCTIONS&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;instruction_ids&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">           </span><span class="p">{</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;len&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">4</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="w"></span>
<span class="w">           </span><span class="p">},</span><span class="w"></span>
<span class="w">           </span><span class="p">...</span><span class="w"></span>
<span class="w">          </span><span class="p">]</span><span class="w"></span>
<span class="w">        </span><span class="p">},</span><span class="w"></span>
<span class="w">        </span><span class="p">...</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;name&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;table_1&quot;</span><span class="w"></span>
<span class="w">    </span><span class="p">},</span><span class="w"></span>
<span class="w">    </span><span class="p">...</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-ports-stats">
<h3><a class="toc-backref" href="#id20">Get ports stats</a><a class="headerlink" href="#get-ports-stats" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get ports stats of the switch which specified with Datapath ID in URI.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="79%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/port/&lt;dpid&gt;[/&lt;port&gt;]</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Specification of port number is optional.</p>
</div>
</div></blockquote>
<p>Response message body(OpenFlow1.3 or earlier):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="17%" />
<col width="72%" />
<col width="11%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>port_no</td>
<td>Port number</td>
<td>1</td>
</tr>
<tr class="row-even"><td>rx_packets</td>
<td>Number of received packets</td>
<td>9</td>
</tr>
<tr class="row-odd"><td>tx_packets</td>
<td>Number of transmitted packets</td>
<td>6</td>
</tr>
<tr class="row-even"><td>rx_bytes</td>
<td>Number of received bytes</td>
<td>738</td>
</tr>
<tr class="row-odd"><td>tx_bytes</td>
<td>Number of transmitted bytes</td>
<td>252</td>
</tr>
<tr class="row-even"><td>rx_dropped</td>
<td>Number of packets dropped by RX</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>tx_dropped</td>
<td>Number of packets dropped by TX</td>
<td>0</td>
</tr>
<tr class="row-even"><td>rx_errors</td>
<td>Number of receive errors</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>tx_errors</td>
<td>Number of transmit errors</td>
<td>0</td>
</tr>
<tr class="row-even"><td>rx_frame_err</td>
<td>Number of frame alignment errors</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>rx_over_err</td>
<td>Number of packets with RX overrun</td>
<td>0</td>
</tr>
<tr class="row-even"><td>rx_crc_err</td>
<td>Number of CRC errors</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>collisions</td>
<td>Number of collisions</td>
<td>0</td>
</tr>
<tr class="row-even"><td>duration_sec</td>
<td>Time port has been alive in seconds</td>
<td>12</td>
</tr>
<tr class="row-odd"><td>duration_nsec</td>
<td>Time port has been alive in nanoseconds beyond duration_sec</td>
<td>9.76e+08</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Response message body(OpenFlow1.4 or later):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="9%" />
<col width="39%" />
<col width="52%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>port_no</td>
<td>Port number</td>
<td>1</td>
</tr>
<tr class="row-even"><td>rx_packets</td>
<td>Number of received packets</td>
<td>9</td>
</tr>
<tr class="row-odd"><td>tx_packets</td>
<td>Number of transmitted packets</td>
<td>6</td>
</tr>
<tr class="row-even"><td>rx_bytes</td>
<td>Number of received bytes</td>
<td>738</td>
</tr>
<tr class="row-odd"><td>tx_bytes</td>
<td>Number of transmitted bytes</td>
<td>252</td>
</tr>
<tr class="row-even"><td>rx_dropped</td>
<td>Number of packets dropped by RX</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>tx_dropped</td>
<td>Number of packets dropped by TX</td>
<td>0</td>
</tr>
<tr class="row-even"><td>rx_errors</td>
<td>Number of receive errors</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>tx_errors</td>
<td>Number of transmit errors</td>
<td>0</td>
</tr>
<tr class="row-even"><td>duration_sec</td>
<td>Time port has been alive in seconds</td>
<td>12</td>
</tr>
<tr class="row-odd"><td>duration_nsec</td>
<td>Time port has been alive in nanoseconds beyond duration_sec</td>
<td>9.76e+08</td>
</tr>
<tr class="row-even"><td>properties</td>
<td>struct ofp_port_desc_prop_header</td>
<td>[{&quot;rx_frame_err&quot;: 0, &quot;rx_over_err&quot;: 0, &quot;rx_crc_err&quot;: 0, &quot;collisions&quot;: 0,...},...]</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/port/1
</pre></div>
</div>
<p>Response (OpenFlow1.3 or earlier):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;port_no&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;rx_packets&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">9</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;tx_packets&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">6</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;rx_bytes&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">738</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;tx_bytes&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">252</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;rx_dropped&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;tx_dropped&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;rx_errors&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;tx_errors&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;rx_frame_err&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;rx_over_err&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;rx_crc_err&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;collisions&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_sec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">12</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_nsec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">9.76e+08</span><span class="w"></span>
<span class="w">    </span><span class="p">},</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="o">:</span><span class="w"></span>
<span class="w">      </span><span class="o">:</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
<p>Response (OpenFlow1.4 or later):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">   </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">     </span><span class="p">{</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;port_no&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;rx_packets&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">9</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;tx_packets&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">6</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;rx_bytes&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">738</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;tx_bytes&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">252</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;rx_dropped&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;tx_dropped&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;rx_errors&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;tx_errors&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;duration_nsec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">12</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;duration_sec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">9.76e+08</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;properties&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">         </span><span class="p">{</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;rx_frame_err&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;rx_over_err&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;rx_crc_err&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;collisions&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;ETHERNET&quot;</span><span class="w"></span>
<span class="w">         </span><span class="p">},</span><span class="w"></span>
<span class="w">         </span><span class="p">{</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;bias_current&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">300</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;flags&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">3</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;rx_freq_lmda&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1500</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;rx_grid_span&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">500</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;rx_offset&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">700</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;rx_pwr&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2000</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;temperature&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">273</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;tx_freq_lmda&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1500</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;tx_grid_span&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">500</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;tx_offset&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">700</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;tx_pwr&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2000</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;OPTICAL&quot;</span><span class="w"></span>
<span class="w">         </span><span class="p">},</span><span class="w"></span>
<span class="w">         </span><span class="p">{</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;data&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[],</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;exp_type&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;experimenter&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">101</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;EXPERIMENTER&quot;</span><span class="w"></span>
<span class="w">         </span><span class="p">},</span><span class="w"></span>
<span class="w">         </span><span class="p">{</span><span class="w"></span>
<span class="w">           </span><span class="o">:</span><span class="w"></span>

<span class="w">           </span><span class="o">:</span><span class="w"></span>
<span class="w">         </span><span class="p">}</span><span class="w"></span>
<span class="w">       </span><span class="p">]</span><span class="w"></span>
<span class="w">     </span><span class="p">}</span><span class="w"></span>
<span class="w">   </span><span class="p">]</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-ports-description">
<span id="id3"></span><h3><a class="toc-backref" href="#id21">Get ports description</a><a class="headerlink" href="#get-ports-description" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get ports description of the switch which specified with Datapath ID in URI.</p>
<p>Usage(OpenFlow1.4 or earlier):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="23%" />
<col width="77%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/portdesc/&lt;dpid&gt;</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Usage(OpenFlow1.5 or later):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="17%" />
<col width="83%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/portdesc/&lt;dpid&gt;/[&lt;port&gt;]</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Specification of port number is optional.</p>
</div>
</div></blockquote>
<p>Response message body(OpenFlow1.3 or earlier):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="19%" />
<col width="53%" />
<col width="28%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>port_no</td>
<td>Port number</td>
<td>1</td>
</tr>
<tr class="row-even"><td>hw_addr</td>
<td>Ethernet hardware address</td>
<td>&quot;0a:b6:d0:0c:e1:d7&quot;</td>
</tr>
<tr class="row-odd"><td>name</td>
<td>Name of port</td>
<td>&quot;s1-eth1&quot;</td>
</tr>
<tr class="row-even"><td>config</td>
<td>Bitmap of OFPPC_* flags</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>state</td>
<td>Bitmap of OFPPS_* flags</td>
<td>0</td>
</tr>
<tr class="row-even"><td>curr</td>
<td>Current features</td>
<td>2112</td>
</tr>
<tr class="row-odd"><td>advertised</td>
<td>Features being advertised by the port</td>
<td>0</td>
</tr>
<tr class="row-even"><td>supported</td>
<td>Features supported by the port</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>peer</td>
<td>Features advertised by peer</td>
<td>0</td>
</tr>
<tr class="row-even"><td>curr_speed</td>
<td>Current port bitrate in kbps</td>
<td>1e+07</td>
</tr>
<tr class="row-odd"><td>max_speed</td>
<td>Max port bitrate in kbps</td>
<td>0</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Response message body(OpenFlow1.4 or later):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="16%" />
<col width="42%" />
<col width="42%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>port_no</td>
<td>Port number</td>
<td>1</td>
</tr>
<tr class="row-even"><td>hw_addr</td>
<td>Ethernet hardware address</td>
<td>&quot;0a:b6:d0:0c:e1:d7&quot;</td>
</tr>
<tr class="row-odd"><td>name</td>
<td>Name of port</td>
<td>&quot;s1-eth1&quot;</td>
</tr>
<tr class="row-even"><td>config</td>
<td>Bitmap of OFPPC_* flags</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>state</td>
<td>Bitmap of OFPPS_* flags</td>
<td>0</td>
</tr>
<tr class="row-even"><td>length</td>
<td>Length of this entry</td>
<td>168</td>
</tr>
<tr class="row-odd"><td>properties</td>
<td>struct ofp_port_desc_prop_header</td>
<td>[{&quot;length&quot;: 32, &quot;curr&quot;: 10248,...}...]</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/portdesc/1
</pre></div>
</div>
<p>Response (OpenFlow1.3 or earlier):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;port_no&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;hw_addr&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;0a:b6:d0:0c:e1:d7&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;name&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;s1-eth1&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;config&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;state&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;curr&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2112</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;advertised&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;supported&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;peer&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;curr_speed&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1e+07</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;max_speed&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="w"></span>
<span class="w">    </span><span class="p">},</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="o">:</span><span class="w"></span>
<span class="w">      </span><span class="o">:</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
<p>Response (OpenFlow1.4 or later):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">   </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">     </span><span class="p">{</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;port_no&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;hw_addr&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;0a:b6:d0:0c:e1:d7&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;name&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;s1-eth1&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;config&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;state&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;length&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">168</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;properties&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">         </span><span class="p">{</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;length&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">32</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;curr&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">10248</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;advertised&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">10240</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;supported&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">10248</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;peer&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">10248</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;curr_speed&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">5000</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;max_speed&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">5000</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;ETHERNET&quot;</span><span class="w"></span>
<span class="w">         </span><span class="p">},</span><span class="w"></span>
<span class="w">         </span><span class="p">{</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;length&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">40</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;rx_grid_freq_lmda&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1500</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;tx_grid_freq_lmda&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1500</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;rx_max_freq_lmda&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2000</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;tx_max_freq_lmda&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2000</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;rx_min_freq_lmda&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1000</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;tx_min_freq_lmda&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1000</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;tx_pwr_max&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2000</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;tx_pwr_min&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1000</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;supported&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;OPTICAL&quot;</span><span class="w"></span>
<span class="w">         </span><span class="p">},</span><span class="w"></span>
<span class="w">         </span><span class="p">{</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;data&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[],</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;exp_type&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;experimenter&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">101</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;length&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">12</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;EXPERIMENTER&quot;</span><span class="w"></span>
<span class="w">         </span><span class="p">},</span><span class="w"></span>
<span class="w">         </span><span class="p">{</span><span class="w"></span>
<span class="w">           </span><span class="o">:</span><span class="w"></span>

<span class="w">           </span><span class="o">:</span><span class="w"></span>
<span class="w">         </span><span class="p">}</span><span class="w"></span>
<span class="w">       </span><span class="p">]</span><span class="w"></span>
<span class="w">     </span><span class="p">}</span><span class="w"></span>
<span class="w">   </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-queues-stats">
<h3><a class="toc-backref" href="#id22">Get queues stats</a><a class="headerlink" href="#get-queues-stats" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get queues stats of the switch which specified with Datapath ID in URI.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="15%" />
<col width="85%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/queue/&lt;dpid&gt;[/&lt;port&gt;[/&lt;queue_id&gt;]]</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>Specification of port number and queue id are optional.</p>
<p>If you want to omitting the port number and setting the queue id,
please specify the keyword &quot;ALL&quot; to the port number.</p>
<p class="last">e.g. GET <a class="reference external" href="http://localhost:8080/stats/queue/1/ALL/1">http://localhost:8080/stats/queue/1/ALL/1</a></p>
</div>
</div></blockquote>
<p>Response message body(OpenFlow1.3 or earlier):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="16%" />
<col width="71%" />
<col width="13%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>port_no</td>
<td>Port number</td>
<td>1</td>
</tr>
<tr class="row-even"><td>queue_id</td>
<td>Queue ID</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>tx_bytes</td>
<td>Number of transmitted bytes</td>
<td>0</td>
</tr>
<tr class="row-even"><td>tx_packets</td>
<td>Number of transmitted packets</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>tx_errors</td>
<td>Number of packets dropped due to overrun</td>
<td>0</td>
</tr>
<tr class="row-even"><td>duration_sec</td>
<td>Time queue has been alive in seconds</td>
<td>4294963425</td>
</tr>
<tr class="row-odd"><td>duration_nsec</td>
<td>Time queue has been alive in nanoseconds beyond duration_sec</td>
<td>3912967296</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Response message body(OpenFlow1.4 or later):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="12%" />
<col width="54%" />
<col width="34%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>port_no</td>
<td>Port number</td>
<td>1</td>
</tr>
<tr class="row-even"><td>queue_id</td>
<td>Queue ID</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>tx_bytes</td>
<td>Number of transmitted bytes</td>
<td>0</td>
</tr>
<tr class="row-even"><td>tx_packets</td>
<td>Number of transmitted packets</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>tx_errors</td>
<td>Number of packets dropped due to overrun</td>
<td>0</td>
</tr>
<tr class="row-even"><td>duration_sec</td>
<td>Time queue has been alive in seconds</td>
<td>4294963425</td>
</tr>
<tr class="row-odd"><td>duration_nsec</td>
<td>Time queue has been alive in nanoseconds beyond duration_sec</td>
<td>3912967296</td>
</tr>
<tr class="row-even"><td>length</td>
<td>Length of this entry</td>
<td>104</td>
</tr>
<tr class="row-odd"><td>properties</td>
<td>struct ofp_queue_stats_prop_header</td>
<td>[{&quot;type&quot;: 65535,&quot;length&quot;: 12,...},...]</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/queue/1
</pre></div>
</div>
<p>Response (OpenFlow1.3 or earlier):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;port_no&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;queue_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;tx_bytes&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;tx_packets&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;tx_errors&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_sec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">4294963425</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_nsec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">3912967296</span><span class="w"></span>
<span class="w">    </span><span class="p">},</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;port_no&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;queue_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;tx_bytes&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;tx_packets&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;tx_errors&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_sec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">4294963425</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_nsec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">3912967296</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
<p>Response (OpenFlow1.4 or later):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;port_no&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;queue_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;tx_bytes&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;tx_packets&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;tx_errors&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_sec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">4294963425</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_nsec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">3912967296</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;length&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">104</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;properties&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">         </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;OFPQueueStatsPropExperimenter&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">               </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">65535</span><span class="p">,</span><span class="w"></span>
<span class="w">               </span><span class="s2">&quot;length&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">16</span><span class="p">,</span><span class="w"></span>
<span class="w">               </span><span class="s2">&quot;data&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">                  </span><span class="mf">1</span><span class="w"></span>
<span class="w">               </span><span class="p">],</span><span class="w"></span>
<span class="w">               </span><span class="s2">&quot;exp_type&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">               </span><span class="s2">&quot;experimenter&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">101</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
<span class="w">         </span><span class="p">},</span><span class="w"></span>
<span class="w">         </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="o">:</span><span class="w"></span>

<span class="w">            </span><span class="o">:</span><span class="w"></span>
<span class="w">         </span><span class="p">}</span><span class="w"></span>
<span class="w">      </span><span class="p">]</span><span class="w"></span>
<span class="w">    </span><span class="p">},</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;port_no&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;queue_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;tx_bytes&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;tx_packets&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;tx_errors&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_sec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">4294963425</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_nsec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">3912967296</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;length&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">48</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;properties&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[]</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-queues-config">
<span id="id4"></span><h3><a class="toc-backref" href="#id23">Get queues config</a><a class="headerlink" href="#get-queues-config" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get queues config of the switch which specified with Datapath ID and Port in URI.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="17%" />
<col width="83%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/queueconfig/&lt;dpid&gt;/[&lt;port&gt;]</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Specification of port number is optional.</p>
</div>
<div class="admonition caution">
<p class="first admonition-title">Caution</p>
<p class="last">This message is deprecated in Openflow1.4.
If OpenFlow 1.4 or later is in use, please refer to <a class="reference internal" href="#get-queues-description"><span class="std std-ref">Get queues description</span></a> instead.</p>
</div>
</div></blockquote>
<p>Response message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="15%" />
<col width="49%" />
<col width="36%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>port</td>
<td>Port which was queried</td>
<td>1</td>
</tr>
<tr class="row-even"><td>queues</td>
<td>struct ofp_packet_queue</td>
<td>&#160;</td>
</tr>
<tr class="row-odd"><td>-- queue_id</td>
<td>ID for the specific queue</td>
<td>2</td>
</tr>
<tr class="row-even"><td>-- port</td>
<td>Port this queue is attached to</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>-- properties</td>
<td>struct ofp_queue_prop_header properties</td>
<td>[{&quot;property&quot;: &quot;MIN_RATE&quot;,&quot;rate&quot;: 80}]</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/queueconfig/1/1
</pre></div>
</div>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;port&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;queues&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;properties&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">            </span><span class="p">{</span><span class="w"></span>
<span class="w">              </span><span class="s2">&quot;property&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;MIN_RATE&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">              </span><span class="s2">&quot;rate&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">80</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
<span class="w">          </span><span class="p">],</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;port&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;queue_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="w"></span>
<span class="w">        </span><span class="p">},</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;properties&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">            </span><span class="p">{</span><span class="w"></span>
<span class="w">              </span><span class="s2">&quot;property&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;MAX_RATE&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">              </span><span class="s2">&quot;rate&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">120</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
<span class="w">          </span><span class="p">],</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;port&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2</span><span class="p">,</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;queue_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2</span><span class="w"></span>
<span class="w">        </span><span class="p">},</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;properties&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">            </span><span class="p">{</span><span class="w"></span>
<span class="w">              </span><span class="s2">&quot;property&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;EXPERIMENTER&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">              </span><span class="s2">&quot;data&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[],</span><span class="w"></span>
<span class="w">              </span><span class="s2">&quot;experimenter&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">999</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
<span class="w">          </span><span class="p">],</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;port&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">3</span><span class="p">,</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;queue_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">3</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">      </span><span class="p">]</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-queues-description">
<span id="id5"></span><h3><a class="toc-backref" href="#id24">Get queues description</a><a class="headerlink" href="#get-queues-description" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get queues description of the switch which specified with Datapath ID, Port and Queue_id in URI.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="13%" />
<col width="87%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/queuedesc/&lt;dpid&gt;[/&lt;port&gt;/[&lt;queue_id&gt;]]</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>Specification of port number and queue id are optional.</p>
<p>If you want to omitting the port number and setting the queue id,
please specify the keyword &quot;ALL&quot; to the port number.</p>
<p class="last">e.g. GET <a class="reference external" href="http://localhost:8080/stats/queuedesc/1/ALL/1">http://localhost:8080/stats/queuedesc/1/ALL/1</a></p>
</div>
<div class="admonition caution">
<p class="first admonition-title">Caution</p>
<p class="last">This message is available in OpenFlow1.4 or later.
If Openflow1.3 or earlier is in use, please refer to <a class="reference internal" href="#get-queues-config"><span class="std std-ref">Get queues config</span></a> instead.</p>
</div>
</div></blockquote>
<p>Response message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="15%" />
<col width="49%" />
<col width="36%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>len</td>
<td>Length in bytes of this queue desc</td>
<td>88</td>
</tr>
<tr class="row-even"><td>port_no</td>
<td>Port which was queried</td>
<td>1</td>
</tr>
<tr class="row-odd"><td>queue_id</td>
<td>Queue ID</td>
<td>1</td>
</tr>
<tr class="row-even"><td>properties</td>
<td>struct ofp_queue_desc_prop_header</td>
<td>[{&quot;length&quot;: 8, ...},...]</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/queuedesc/1/1/1
</pre></div>
</div>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">     </span><span class="p">{</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;len&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">88</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;port_no&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;queue_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;properties&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">         </span><span class="p">{</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;length&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">8</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;rate&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">300</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;MIN_RATE&quot;</span><span class="w"></span>
<span class="w">         </span><span class="p">},</span><span class="w"></span>
<span class="w">         </span><span class="p">{</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;length&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">8</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;rate&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">900</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;MAX_RATE&quot;</span><span class="w"></span>
<span class="w">         </span><span class="p">},</span><span class="w"></span>
<span class="w">         </span><span class="p">{</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;length&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">16</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;exp_type&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;experimenter&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">101</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;data&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="mf">1</span><span class="p">],</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;EXPERIMENTER&quot;</span><span class="w"></span>
<span class="w">         </span><span class="p">},</span><span class="w"></span>
<span class="w">         </span><span class="p">{</span><span class="w"></span>
<span class="w">           </span><span class="o">:</span><span class="w"></span>

<span class="w">           </span><span class="o">:</span><span class="w"></span>
<span class="w">         </span><span class="p">}</span><span class="w"></span>
<span class="w">       </span><span class="p">]</span><span class="w"></span>
<span class="w">     </span><span class="p">}</span><span class="w"></span>
<span class="w">   </span><span class="p">]</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-groups-stats">
<h3><a class="toc-backref" href="#id25">Get groups stats</a><a class="headerlink" href="#get-groups-stats" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get groups stats of the switch which specified with Datapath ID in URI.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="18%" />
<col width="82%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/group/&lt;dpid&gt;[/&lt;group_id&gt;]</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Specification of group id is optional.</p>
</div>
</div></blockquote>
<p>Response message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="18%" />
<col width="71%" />
<col width="10%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>length</td>
<td>Length of this entry</td>
<td>56</td>
</tr>
<tr class="row-even"><td>group_id</td>
<td>Group ID</td>
<td>1</td>
</tr>
<tr class="row-odd"><td>ref_count</td>
<td>Number of flows or groups that directly forward to this group</td>
<td>1</td>
</tr>
<tr class="row-even"><td>packet_count</td>
<td>Number of packets processed by group</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>byte_count</td>
<td>Number of bytes processed by group</td>
<td>0</td>
</tr>
<tr class="row-even"><td>duration_sec</td>
<td>Time group has been alive in seconds</td>
<td>161</td>
</tr>
<tr class="row-odd"><td>duration_nsec</td>
<td>Time group has been alive in nanoseconds beyond duration_sec</td>
<td>3.03e+08</td>
</tr>
<tr class="row-even"><td>bucket_stats</td>
<td>struct ofp_bucket_counter</td>
<td>&#160;</td>
</tr>
<tr class="row-odd"><td>-- packet_count</td>
<td>Number of packets processed by bucket</td>
<td>0</td>
</tr>
<tr class="row-even"><td>-- byte_count</td>
<td>Number of bytes processed by bucket</td>
<td>0</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/group/1
</pre></div>
</div>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;length&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">56</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;group_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;ref_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;packet_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;byte_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_sec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">161</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_nsec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">3.03e+08</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;bucket_stats&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;packet_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;byte_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">      </span><span class="p">]</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-group-description-stats">
<span id="id6"></span><h3><a class="toc-backref" href="#id26">Get group description stats</a><a class="headerlink" href="#get-group-description-stats" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get group description stats of the switch which specified with Datapath ID in URI.</p>
<p>Usage(Openflow1.4 or earlier):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="23%" />
<col width="77%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/groupdesc/&lt;dpid&gt;</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Usage(Openflow1.5 or later):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="16%" />
<col width="84%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/groupdesc/&lt;dpid&gt;/[&lt;group_id&gt;]</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Specification of group id is optional.</p>
</div>
</div></blockquote>
<p>Response message body(Openflow1.3 or earlier):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="18%" />
<col width="66%" />
<col width="16%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>type</td>
<td>One of OFPGT_*</td>
<td>&quot;ALL&quot;</td>
</tr>
<tr class="row-even"><td>group_id</td>
<td>Group ID</td>
<td>1</td>
</tr>
<tr class="row-odd"><td>buckets</td>
<td>struct ofp_bucket</td>
<td>&#160;</td>
</tr>
<tr class="row-even"><td>-- weight</td>
<td>Relative weight of bucket
(Only defined for select groups)</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>-- watch_port</td>
<td>Port whose state affects whether this bucket is live
(Only required for fast failover groups)</td>
<td>4294967295</td>
</tr>
<tr class="row-even"><td>-- watch_group</td>
<td>Group whose state affects whether this bucket is live
(Only required for fast failover groups)</td>
<td>4294967295</td>
</tr>
<tr class="row-odd"><td>-- actions</td>
<td>0 or more actions associated with the bucket</td>
<td>[&quot;OUTPUT:1&quot;]</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Response message body(Openflow1.4 or later):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="14%" />
<col width="52%" />
<col width="34%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>type</td>
<td>One of OFPGT_*</td>
<td>&quot;ALL&quot;</td>
</tr>
<tr class="row-even"><td>group_id</td>
<td>Group ID</td>
<td>1</td>
</tr>
<tr class="row-odd"><td>length</td>
<td>Length of this entry</td>
<td>40</td>
</tr>
<tr class="row-even"><td>buckets</td>
<td>struct ofp_bucket</td>
<td>&#160;</td>
</tr>
<tr class="row-odd"><td>-- weight</td>
<td>Relative weight of bucket
(Only defined for select groups)</td>
<td>0</td>
</tr>
<tr class="row-even"><td>-- watch_port</td>
<td>Port whose state affects whether this bucket is live
(Only required for fast failover groups)</td>
<td>4294967295</td>
</tr>
<tr class="row-odd"><td>-- watch_group</td>
<td>Group whose state affects whether this bucket is live
(Only required for fast failover groups)</td>
<td>4294967295</td>
</tr>
<tr class="row-even"><td>-- len</td>
<td>Length the bucket in bytes, including this header and
any adding to make it 64-bit aligned.</td>
<td>32</td>
</tr>
<tr class="row-odd"><td>-- actions</td>
<td>0 or more actions associated with the bucket</td>
<td>[{&quot;OUTPUT:1&quot;, &quot;max_len&quot;: 65535,...}]</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/groupdesc/1
</pre></div>
</div>
<p>Response (Openflow1.3 or earlier):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;ALL&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;group_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;buckets&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;weight&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;watch_port&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">4294967295</span><span class="p">,</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;watch_group&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">4294967295</span><span class="p">,</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;actions&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;OUTPUT:1&quot;</span><span class="w"></span>
<span class="w">          </span><span class="p">]</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">      </span><span class="p">]</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
<p>Response (Openflow1.4 or later):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">   </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">     </span><span class="p">{</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;ALL&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;group_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;length&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">40</span><span class="p">,</span><span class="w"></span>
<span class="w">       </span><span class="s2">&quot;buckets&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">         </span><span class="p">{</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;weight&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;watch_port&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;watch_group&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;len&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">32</span><span class="p">,</span><span class="w"></span>
<span class="w">           </span><span class="s2">&quot;actions&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">             </span><span class="p">{</span><span class="w"></span>
<span class="w">                 </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;OUTPUT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">                 </span><span class="s2">&quot;max_len&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">65535</span><span class="p">,</span><span class="w"></span>
<span class="w">                 </span><span class="s2">&quot;port&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">2</span><span class="w"></span>
<span class="w">             </span><span class="p">}</span><span class="w"></span>
<span class="w">           </span><span class="p">]</span><span class="w"></span>
<span class="w">         </span><span class="p">}</span><span class="w"></span>
<span class="w">       </span><span class="p">]</span><span class="w"></span>
<span class="w">     </span><span class="p">}</span><span class="w"></span>
<span class="w">   </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-group-features-stats">
<h3><a class="toc-backref" href="#id27">Get group features stats</a><a class="headerlink" href="#get-group-features-stats" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get group features stats of the switch which specified with Datapath ID in URI.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="20%" />
<col width="80%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/groupfeatures/&lt;dpid&gt;</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Response message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="13%" />
<col width="41%" />
<col width="45%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>types</td>
<td>Bitmap of (1 &lt;&lt; OFPGT_*) values supported</td>
<td>[]</td>
</tr>
<tr class="row-even"><td>capabilities</td>
<td>Bitmap of OFPGFC_* capability supported</td>
<td>[&quot;SELECT_WEIGHT&quot;,&quot;SELECT_LIVENESS&quot;,&quot;CHAINING&quot;]</td>
</tr>
<tr class="row-odd"><td>max_groups</td>
<td>Maximum number of groups for each type</td>
<td>[{&quot;ALL&quot;: 4294967040},...]</td>
</tr>
<tr class="row-even"><td>actions</td>
<td>Bitmaps of (1 &lt;&lt; OFPAT_*) values supported</td>
<td>[{&quot;ALL&quot;: [&quot;OUTPUT&quot;,...]},...]</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/groupfeatures/1
</pre></div>
</div>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;types&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;capabilities&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;SELECT_WEIGHT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;SELECT_LIVENESS&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;CHAINING&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;max_groups&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;ALL&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">4294967040</span><span class="w"></span>
<span class="w">        </span><span class="p">},</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;SELECT&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">4294967040</span><span class="w"></span>
<span class="w">        </span><span class="p">},</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;INDIRECT&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">4294967040</span><span class="w"></span>
<span class="w">        </span><span class="p">},</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;FF&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">4294967040</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;actions&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;ALL&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;OUTPUT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;COPY_TTL_OUT&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;COPY_TTL_IN&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;SET_MPLS_TTL&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;DEC_MPLS_TTL&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;PUSH_VLAN&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;POP_VLAN&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;PUSH_MPLS&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;POP_MPLS&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;SET_QUEUE&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;GROUP&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;SET_NW_TTL&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;DEC_NW_TTL&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;SET_FIELD&quot;</span><span class="w"></span>
<span class="w">          </span><span class="p">]</span><span class="w"></span>
<span class="w">        </span><span class="p">},</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;SELECT&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[]</span><span class="w"></span>
<span class="w">        </span><span class="p">},</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;INDIRECT&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[]</span><span class="w"></span>
<span class="w">        </span><span class="p">},</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;FF&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[]</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">      </span><span class="p">]</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-meters-stats">
<h3><a class="toc-backref" href="#id28">Get meters stats</a><a class="headerlink" href="#get-meters-stats" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get meters stats of the switch which specified with Datapath ID in URI.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="18%" />
<col width="82%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/meter/&lt;dpid&gt;[/&lt;meter_id&gt;]</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Specification of meter id is optional.</p>
</div>
</div></blockquote>
<p>Response message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="23%" />
<col width="68%" />
<col width="9%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>meter_id</td>
<td>Meter ID</td>
<td>1</td>
</tr>
<tr class="row-even"><td>len</td>
<td>Length in bytes of this stats</td>
<td>56</td>
</tr>
<tr class="row-odd"><td>flow_count</td>
<td>Number of flows bound to meter</td>
<td>0</td>
</tr>
<tr class="row-even"><td>packet_in_count</td>
<td>Number of packets in input</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>byte_in_count</td>
<td>Number of bytes in input</td>
<td>0</td>
</tr>
<tr class="row-even"><td>duration_sec</td>
<td>Time meter has been alive in seconds</td>
<td>37</td>
</tr>
<tr class="row-odd"><td>duration_nsec</td>
<td>Time meter has been alive in nanoseconds beyond duration_sec</td>
<td>988000</td>
</tr>
<tr class="row-even"><td>band_stats</td>
<td>struct ofp_meter_band_stats</td>
<td>&#160;</td>
</tr>
<tr class="row-odd"><td>-- packet_band_count</td>
<td>Number of packets in band</td>
<td>0</td>
</tr>
<tr class="row-even"><td>-- byte_band_count</td>
<td>Number of bytes in band</td>
<td>0</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/meter/1
</pre></div>
</div>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;meter_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;len&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">56</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;flow_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;packet_in_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;byte_in_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_sec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">37</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;duration_nsec&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">988000</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;band_stats&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;packet_band_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;byte_band_count&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">      </span><span class="p">]</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-meter-config-stats">
<span id="id7"></span><h3><a class="toc-backref" href="#id29">Get meter config stats</a><a class="headerlink" href="#get-meter-config-stats" title="Permalink to this headline">¶</a></h3>
</div>
<div class="section" id="get-meter-description-stats">
<h3><a class="toc-backref" href="#id30">Get meter description stats</a><a class="headerlink" href="#get-meter-description-stats" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get meter config stats of the switch which specified with Datapath ID in URI.</p>
<blockquote>
<div><div class="admonition caution">
<p class="first admonition-title">Caution</p>
<p class="last">This message has been renamed in openflow 1.5.
If Openflow 1.4 or earlier is in use, please used as Get meter description stats.
If Openflow 1.5 or later is in use, please used as Get meter description stats.</p>
</div>
</div></blockquote>
<p>Usage(Openflow1.4 or earlier):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="16%" />
<col width="84%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/meterconfig/&lt;dpid&gt;[/&lt;meter_id&gt;]</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Usage(Openflow1.5 or later):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="16%" />
<col width="84%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/meterdesc/&lt;dpid&gt;[/&lt;meter_id&gt;]</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Specification of meter id is optional.</p>
</div>
</div></blockquote>
<p>Response message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="66%" />
<col width="13%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>flags</td>
<td>All OFPMC_* that apply</td>
<td>&quot;KBPS&quot;</td>
</tr>
<tr class="row-even"><td>meter_id</td>
<td>Meter ID</td>
<td>1</td>
</tr>
<tr class="row-odd"><td>bands</td>
<td>struct ofp_meter_band_header</td>
<td>&#160;</td>
</tr>
<tr class="row-even"><td>-- type</td>
<td>One of OFPMBT_*</td>
<td>&quot;DROP&quot;</td>
</tr>
<tr class="row-odd"><td>-- rate</td>
<td>Rate for this band</td>
<td>1000</td>
</tr>
<tr class="row-even"><td>-- burst_size</td>
<td>Size of bursts</td>
<td>0</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/meterconfig/1
</pre></div>
</div>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;flags&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;KBPS&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;meter_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;bands&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;type&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;DROP&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;rate&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">1000</span><span class="p">,</span><span class="w"></span>
<span class="w">          </span><span class="s2">&quot;burst_size&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">      </span><span class="p">]</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-meter-features-stats">
<h3><a class="toc-backref" href="#id31">Get meter features stats</a><a class="headerlink" href="#get-meter-features-stats" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get meter features stats of the switch which specified with Datapath ID in URI.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="20%" />
<col width="80%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/meterfeatures/&lt;dpid&gt;</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Response message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="15%" />
<col width="52%" />
<col width="32%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>&quot;1&quot;</td>
</tr>
<tr class="row-odd"><td>max_meter</td>
<td>Maximum number of meters</td>
<td>256</td>
</tr>
<tr class="row-even"><td>band_types</td>
<td>Bitmaps of (1 &lt;&lt; OFPMBT_*) values supported</td>
<td>[&quot;DROP&quot;]</td>
</tr>
<tr class="row-odd"><td>capabilities</td>
<td>Bitmaps of &quot;ofp_meter_flags&quot;</td>
<td>[&quot;KBPS&quot;, &quot;BURST&quot;, &quot;STATS&quot;]</td>
</tr>
<tr class="row-even"><td>max_bands</td>
<td>Maximum bands per meters</td>
<td>16</td>
</tr>
<tr class="row-odd"><td>max_color</td>
<td>Maximum color value</td>
<td>8</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/meterfeatures/1
</pre></div>
</div>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;max_meter&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">256</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;band_types&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;DROP&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;capabilities&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;KBPS&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;BURST&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="s2">&quot;STATS&quot;</span><span class="w"></span>
<span class="w">      </span><span class="p">],</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;max_bands&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">16</span><span class="p">,</span><span class="w"></span>
<span class="w">      </span><span class="s2">&quot;max_color&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">8</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
<span class="w">  </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="get-role">
<h3><a class="toc-backref" href="#id32">Get role</a><a class="headerlink" href="#get-role" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Get the current role of the controller from the switch.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="22%" />
<col width="78%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>GET</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/role/&lt;dpid&gt;</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Response message body(Openflow1.4 or earlier):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="25%" />
<col width="57%" />
<col width="18%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>1</td>
</tr>
<tr class="row-odd"><td>role</td>
<td>One of OFPCR_ROLE_*</td>
<td>&quot;EQUAL&quot;</td>
</tr>
<tr class="row-even"><td>generation_id</td>
<td>Master Election Generation Id</td>
<td>0</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Response message body(Openflow1.5 or later):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="25%" />
<col width="57%" />
<col width="18%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID</td>
<td>1</td>
</tr>
<tr class="row-odd"><td>role</td>
<td>One of OFPCR_ROLE_*</td>
<td>&quot;EQUAL&quot;</td>
</tr>
<tr class="row-even"><td>short_id</td>
<td>ID number for the controller</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>generation_id</td>
<td>Master Election Generation Id</td>
<td>0</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X GET http://localhost:8080/stats/role/1
</pre></div>
</div>
<p>Response (Openflow1.4 or earlier):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;generation_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;role&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;EQUAL&quot;</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
<p>Response (Openflow1.5 or later):</p>
<div class="highlight-javascript notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="s2">&quot;1&quot;</span><span class="o">:</span><span class="w"> </span><span class="p">[</span><span class="w"></span>
<span class="w">        </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;generation_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;role&quot;</span><span class="o">:</span><span class="w"> </span><span class="s2">&quot;EQUAL&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="s2">&quot;short_id&quot;</span><span class="o">:</span><span class="w"> </span><span class="mf">0</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>
<span class="w">    </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>
</div>
</div></blockquote>
</div>
</div>
<div class="section" id="update-the-switch-stats">
<h2><a class="toc-backref" href="#id33">Update the switch stats</a><a class="headerlink" href="#update-the-switch-stats" title="Permalink to this headline">¶</a></h2>
<div class="section" id="add-a-flow-entry">
<h3><a class="toc-backref" href="#id34">Add a flow entry</a><a class="headerlink" href="#add-a-flow-entry" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Add a flow entry to the switch.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="25%" />
<col width="75%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>POST</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/flowentry/add</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Request message body(Openflow1.3 or earlier):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="12%" />
<col width="48%" />
<col width="27%" />
<col width="14%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID (int)</td>
<td>1</td>
<td>(Mandatory)</td>
</tr>
<tr class="row-odd"><td>cookie</td>
<td>Opaque controller-issued identifier (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-even"><td>cookie_mask</td>
<td>Mask used to restrict the cookie bits (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>table_id</td>
<td>Table ID to put the flow in (int)</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="row-even"><td>idle_timeout</td>
<td>Idle time before discarding (seconds) (int)</td>
<td>30</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>hard_timeout</td>
<td>Max time before discarding (seconds) (int)</td>
<td>30</td>
<td>0</td>
</tr>
<tr class="row-even"><td>priority</td>
<td>Priority level of flow entry (int)</td>
<td>11111</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>buffer_id</td>
<td>Buffered packet to apply to, or OFP_NO_BUFFER (int)</td>
<td>1</td>
<td>OFP_NO_BUFFER</td>
</tr>
<tr class="row-even"><td>flags</td>
<td>Bitmap of OFPFF_* flags (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>match</td>
<td>Fields to match (dict)</td>
<td>{&quot;in_port&quot;:1}</td>
<td>{} #wildcarded</td>
</tr>
<tr class="row-even"><td>actions</td>
<td>Instruction set (list of dict)</td>
<td>[{&quot;type&quot;:&quot;OUTPUT&quot;, &quot;port&quot;:2}]</td>
<td>[] #DROP</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Request message body(Openflow1.4 or later):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="12%" />
<col width="47%" />
<col width="28%" />
<col width="13%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID (int)</td>
<td>1</td>
<td>(Mandatory)</td>
</tr>
<tr class="row-odd"><td>cookie</td>
<td>Opaque controller-issued identifier (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-even"><td>cookie_mask</td>
<td>Mask used to restrict the cookie bits (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>table_id</td>
<td>Table ID to put the flow in (int)</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="row-even"><td>idle_timeout</td>
<td>Idle time before discarding (seconds) (int)</td>
<td>30</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>hard_timeout</td>
<td>Max time before discarding (seconds) (int)</td>
<td>30</td>
<td>0</td>
</tr>
<tr class="row-even"><td>priority</td>
<td>Priority level of flow entry (int)</td>
<td>11111</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>buffer_id</td>
<td>Buffered packet to apply to, or OFP_NO_BUFFER (int)</td>
<td>1</td>
<td>OFP_NO_BUFFER</td>
</tr>
<tr class="row-even"><td>flags</td>
<td>Bitmap of OFPFF_* flags (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>match</td>
<td>Fields to match (dict)</td>
<td>{&quot;in_port&quot;:1}</td>
<td>{} #wildcarded</td>
</tr>
<tr class="row-even"><td>instructions</td>
<td>Instruction set (list of dict)</td>
<td>[{&quot;type&quot;:&quot;METER&quot;, &quot;meter_id&quot;:2}]</td>
<td>[] #DROP</td>
</tr>
</tbody>
</table>
</div></blockquote>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">For description of match and actions, please see <a class="reference internal" href="#description-of-match-and-actions"><span class="std std-ref">Reference: Description of Match and Actions</span></a>.</p>
</div>
<p>Example of use(Openflow1.3 or earlier):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;cookie&quot;: 1,
    &quot;cookie_mask&quot;: 1,
    &quot;table_id&quot;: 0,
    &quot;idle_timeout&quot;: 30,
    &quot;hard_timeout&quot;: 30,
    &quot;priority&quot;: 11111,
    &quot;flags&quot;: 1,
    &quot;match&quot;:{
        &quot;in_port&quot;:1
    },
    &quot;actions&quot;:[
        {
            &quot;type&quot;:&quot;OUTPUT&quot;,
            &quot;port&quot;: 2
        }
    ]
 }&#39; http://localhost:8080/stats/flowentry/add
</pre></div>
</div>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;priority&quot;: 22222,
    &quot;match&quot;:{
        &quot;in_port&quot;:1
    },
    &quot;actions&quot;:[
        {
            &quot;type&quot;:&quot;GOTO_TABLE&quot;,
            &quot;table_id&quot;: 1
        }
    ]
 }&#39; http://localhost:8080/stats/flowentry/add
</pre></div>
</div>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;priority&quot;: 33333,
    &quot;match&quot;:{
        &quot;in_port&quot;:1
    },
    &quot;actions&quot;:[
        {
            &quot;type&quot;:&quot;WRITE_METADATA&quot;,
            &quot;metadata&quot;: 1,
            &quot;metadata_mask&quot;: 1
        }
    ]
 }&#39; http://localhost:8080/stats/flowentry/add
</pre></div>
</div>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;priority&quot;: 44444,
    &quot;match&quot;:{
        &quot;in_port&quot;:1
    },
    &quot;actions&quot;:[
        {
            &quot;type&quot;:&quot;METER&quot;,
            &quot;meter_id&quot;: 1
        }
    ]
 }&#39; http://localhost:8080/stats/flowentry/add
</pre></div>
</div>
<p>Example of use(Openflow1.4 or later):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;cookie&quot;: 1,
    &quot;cookie_mask&quot;: 1,
    &quot;table_id&quot;: 0,
    &quot;idle_timeout&quot;: 30,
    &quot;hard_timeout&quot;: 30,
    &quot;priority&quot;: 11111,
    &quot;flags&quot;: 1,
    &quot;match&quot;:{
        &quot;in_port&quot;:1
    },
    &quot;instructions&quot;: [
        {
            &quot;type&quot;: &quot;APPLY_ACTIONS&quot;,
            &quot;actions&quot;: [
                {
                    &quot;max_len&quot;: 65535,
                    &quot;port&quot;: 2,
                    &quot;type&quot;: &quot;OUTPUT&quot;
                }
            ]
        }
    ]
 }&#39; http://localhost:8080/stats/flowentry/add
</pre></div>
</div>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;priority&quot;: 22222,
    &quot;match&quot;:{
        &quot;in_port&quot;:1
    },
    &quot;instructions&quot;: [
        {
            &quot;type&quot;:&quot;GOTO_TABLE&quot;,
            &quot;table_id&quot;: 1
        }
    ]
 }&#39; http://localhost:8080/stats/flowentry/add
</pre></div>
</div>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;priority&quot;: 33333,
    &quot;match&quot;:{
        &quot;in_port&quot;:1
    },
    &quot;instructions&quot;: [
        {
            &quot;type&quot;:&quot;WRITE_METADATA&quot;,
            &quot;metadata&quot;: 1,
            &quot;metadata_mask&quot;: 1
        }
    ]
 }&#39; http://localhost:8080/stats/flowentry/add
</pre></div>
</div>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;priority&quot;: 44444,
    &quot;match&quot;:{
        &quot;in_port&quot;:1
    },
    &quot;instructions&quot;: [
        {
            &quot;type&quot;:&quot;METER&quot;,
            &quot;meter_id&quot;: 1
        }
    ]
 }&#39; http://localhost:8080/stats/flowentry/add
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">To confirm flow entry registration, please see <a class="reference internal" href="#get-all-flows-stats"><span class="std std-ref">Get all flows stats</span></a> or <a class="reference internal" href="#get-flows-stats-filtered"><span class="std std-ref">Get flows stats filtered by fields</span></a>.</p>
</div>
</div></blockquote>
</div>
<div class="section" id="modify-all-matching-flow-entries">
<h3><a class="toc-backref" href="#id35">Modify all matching flow entries</a><a class="headerlink" href="#modify-all-matching-flow-entries" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Modify all matching flow entries of the switch.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="23%" />
<col width="77%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>POST</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/flowentry/modify</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Request message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="12%" />
<col width="48%" />
<col width="27%" />
<col width="14%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID (int)</td>
<td>1</td>
<td>(Mandatory)</td>
</tr>
<tr class="row-odd"><td>cookie</td>
<td>Opaque controller-issued identifier (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-even"><td>cookie_mask</td>
<td>Mask used to restrict the cookie bits (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>table_id</td>
<td>Table ID to put the flow in (int)</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="row-even"><td>idle_timeout</td>
<td>Idle time before discarding (seconds) (int)</td>
<td>30</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>hard_timeout</td>
<td>Max time before discarding (seconds) (int)</td>
<td>30</td>
<td>0</td>
</tr>
<tr class="row-even"><td>priority</td>
<td>Priority level of flow entry (int)</td>
<td>11111</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>buffer_id</td>
<td>Buffered packet to apply to, or OFP_NO_BUFFER (int)</td>
<td>1</td>
<td>OFP_NO_BUFFER</td>
</tr>
<tr class="row-even"><td>flags</td>
<td>Bitmap of OFPFF_* flags (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>match</td>
<td>Fields to match (dict)</td>
<td>{&quot;in_port&quot;:1}</td>
<td>{} #wildcarded</td>
</tr>
<tr class="row-even"><td>actions</td>
<td>Instruction set (list of dict)</td>
<td>[{&quot;type&quot;:&quot;OUTPUT&quot;, &quot;port&quot;:2}]</td>
<td>[] #DROP</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;cookie&quot;: 1,
    &quot;cookie_mask&quot;: 1,
    &quot;table_id&quot;: 0,
    &quot;idle_timeout&quot;: 30,
    &quot;hard_timeout&quot;: 30,
    &quot;priority&quot;: 11111,
    &quot;flags&quot;: 1,
    &quot;match&quot;:{
        &quot;in_port&quot;:1
    },
    &quot;actions&quot;:[
        {
            &quot;type&quot;:&quot;OUTPUT&quot;,
            &quot;port&quot;: 2
        }
    ]
 }&#39; http://localhost:8080/stats/flowentry/modify
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="modify-flow-entry-strictly">
<h3><a class="toc-backref" href="#id36">Modify flow entry strictly</a><a class="headerlink" href="#modify-flow-entry-strictly" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Modify flow entry strictly matching wildcards and priority</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="18%" />
<col width="82%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>POST</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/flowentry/modify_strict</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Request message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="12%" />
<col width="48%" />
<col width="27%" />
<col width="14%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID (int)</td>
<td>1</td>
<td>(Mandatory)</td>
</tr>
<tr class="row-odd"><td>cookie</td>
<td>Opaque controller-issued identifier (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-even"><td>cookie_mask</td>
<td>Mask used to restrict the cookie bits (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>table_id</td>
<td>Table ID to put the flow in (int)</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="row-even"><td>idle_timeout</td>
<td>Idle time before discarding (seconds) (int)</td>
<td>30</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>hard_timeout</td>
<td>Max time before discarding (seconds) (int)</td>
<td>30</td>
<td>0</td>
</tr>
<tr class="row-even"><td>priority</td>
<td>Priority level of flow entry (int)</td>
<td>11111</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>buffer_id</td>
<td>Buffered packet to apply to, or OFP_NO_BUFFER (int)</td>
<td>1</td>
<td>OFP_NO_BUFFER</td>
</tr>
<tr class="row-even"><td>flags</td>
<td>Bitmap of OFPFF_* flags (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>match</td>
<td>Fields to match (dict)</td>
<td>{&quot;in_port&quot;:1}</td>
<td>{} #wildcarded</td>
</tr>
<tr class="row-even"><td>actions</td>
<td>Instruction set (list of dict)</td>
<td>[{&quot;type&quot;:&quot;OUTPUT&quot;, &quot;port&quot;:2}]</td>
<td>[] #DROP</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;cookie&quot;: 1,
    &quot;cookie_mask&quot;: 1,
    &quot;table_id&quot;: 0,
    &quot;idle_timeout&quot;: 30,
    &quot;hard_timeout&quot;: 30,
    &quot;priority&quot;: 11111,
    &quot;flags&quot;: 1,
    &quot;match&quot;:{
        &quot;in_port&quot;:1
    },
    &quot;actions&quot;:[
        {
            &quot;type&quot;:&quot;OUTPUT&quot;,
            &quot;port&quot;: 2
        }
    ]
 }&#39; http://localhost:8080/stats/flowentry/modify_strict
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="delete-all-matching-flow-entries">
<h3><a class="toc-backref" href="#id37">Delete all matching flow entries</a><a class="headerlink" href="#delete-all-matching-flow-entries" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Delete all matching flow entries of the switch.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="23%" />
<col width="77%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>POST</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/flowentry/delete</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Request message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="12%" />
<col width="48%" />
<col width="27%" />
<col width="14%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID (int)</td>
<td>1</td>
<td>(Mandatory)</td>
</tr>
<tr class="row-odd"><td>cookie</td>
<td>Opaque controller-issued identifier (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-even"><td>cookie_mask</td>
<td>Mask used to restrict the cookie bits (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>table_id</td>
<td>Table ID to put the flow in (int)</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="row-even"><td>idle_timeout</td>
<td>Idle time before discarding (seconds) (int)</td>
<td>30</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>hard_timeout</td>
<td>Max time before discarding (seconds) (int)</td>
<td>30</td>
<td>0</td>
</tr>
<tr class="row-even"><td>priority</td>
<td>Priority level of flow entry (int)</td>
<td>11111</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>buffer_id</td>
<td>Buffered packet to apply to, or OFP_NO_BUFFER (int)</td>
<td>1</td>
<td>OFP_NO_BUFFER</td>
</tr>
<tr class="row-even"><td>out_port</td>
<td>Output port (int)</td>
<td>1</td>
<td>OFPP_ANY</td>
</tr>
<tr class="row-odd"><td>out_group</td>
<td>Output group (int)</td>
<td>1</td>
<td>OFPG_ANY</td>
</tr>
<tr class="row-even"><td>flags</td>
<td>Bitmap of OFPFF_* flags (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>match</td>
<td>Fields to match (dict)</td>
<td>{&quot;in_port&quot;:1}</td>
<td>{} #wildcarded</td>
</tr>
<tr class="row-even"><td>actions</td>
<td>Instruction set (list of dict)</td>
<td>[{&quot;type&quot;:&quot;OUTPUT&quot;, &quot;port&quot;:2}]</td>
<td>[] #DROP</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;cookie&quot;: 1,
    &quot;cookie_mask&quot;: 1,
    &quot;table_id&quot;: 0,
    &quot;idle_timeout&quot;: 30,
    &quot;hard_timeout&quot;: 30,
    &quot;priority&quot;: 11111,
    &quot;flags&quot;: 1,
    &quot;match&quot;:{
        &quot;in_port&quot;:1
    },
    &quot;actions&quot;:[
        {
            &quot;type&quot;:&quot;OUTPUT&quot;,
            &quot;port&quot;: 2
        }
    ]
 }&#39; http://localhost:8080/stats/flowentry/delete
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="delete-flow-entry-strictly">
<h3><a class="toc-backref" href="#id38">Delete flow entry strictly</a><a class="headerlink" href="#delete-flow-entry-strictly" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Delete flow entry strictly matching wildcards and priority.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="18%" />
<col width="82%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>POST</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/flowentry/delete_strict</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Request message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="12%" />
<col width="48%" />
<col width="27%" />
<col width="14%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID (int)</td>
<td>1</td>
<td>(Mandatory)</td>
</tr>
<tr class="row-odd"><td>cookie</td>
<td>Opaque controller-issued identifier (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-even"><td>cookie_mask</td>
<td>Mask used to restrict the cookie bits (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>table_id</td>
<td>Table ID to put the flow in (int)</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="row-even"><td>idle_timeout</td>
<td>Idle time before discarding (seconds) (int)</td>
<td>30</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>hard_timeout</td>
<td>Max time before discarding (seconds) (int)</td>
<td>30</td>
<td>0</td>
</tr>
<tr class="row-even"><td>priority</td>
<td>Priority level of flow entry (int)</td>
<td>11111</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>buffer_id</td>
<td>Buffered packet to apply to, or OFP_NO_BUFFER (int)</td>
<td>1</td>
<td>OFP_NO_BUFFER</td>
</tr>
<tr class="row-even"><td>out_port</td>
<td>Output port (int)</td>
<td>1</td>
<td>OFPP_ANY</td>
</tr>
<tr class="row-odd"><td>out_group</td>
<td>Output group (int)</td>
<td>1</td>
<td>OFPG_ANY</td>
</tr>
<tr class="row-even"><td>flags</td>
<td>Bitmap of OFPFF_* flags (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>match</td>
<td>Fields to match (dict)</td>
<td>{&quot;in_port&quot;:1}</td>
<td>{} #wildcarded</td>
</tr>
<tr class="row-even"><td>actions</td>
<td>Instruction set (list of dict)</td>
<td>[{&quot;type&quot;:&quot;OUTPUT&quot;, &quot;port&quot;:2}]</td>
<td>[] #DROP</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;cookie&quot;: 1,
    &quot;cookie_mask&quot;: 1,
    &quot;table_id&quot;: 0,
    &quot;idle_timeout&quot;: 30,
    &quot;hard_timeout&quot;: 30,
    &quot;priority&quot;: 11111,
    &quot;flags&quot;: 1,
    &quot;match&quot;:{
        &quot;in_port&quot;:1
    },
    &quot;actions&quot;:[
        {
            &quot;type&quot;:&quot;OUTPUT&quot;,
            &quot;port&quot;: 2
        }
    ]
 }&#39; http://localhost:8080/stats/flowentry/delete_strict
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="delete-all-flow-entries">
<h3><a class="toc-backref" href="#id39">Delete all flow entries</a><a class="headerlink" href="#delete-all-flow-entries" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Delete all flow entries of the switch which specified with Datapath ID in URI.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="19%" />
<col width="81%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>DELETE</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/flowentry/clear/&lt;dpid&gt;</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X DELETE http://localhost:8080/stats/flowentry/clear/1
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="add-a-group-entry">
<h3><a class="toc-backref" href="#id40">Add a group entry</a><a class="headerlink" href="#add-a-group-entry" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Add a group entry to the switch.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="24%" />
<col width="76%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>POST</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/groupentry/add</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Request message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="13%" />
<col width="50%" />
<col width="27%" />
<col width="10%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID (int)</td>
<td>1</td>
<td>(Mandatory)</td>
</tr>
<tr class="row-odd"><td>type</td>
<td>One of OFPGT_* (string)</td>
<td>&quot;ALL&quot;</td>
<td>&quot;ALL&quot;</td>
</tr>
<tr class="row-even"><td>group_id</td>
<td>Group ID (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>buckets</td>
<td>struct ofp_bucket</td>
<td>&#160;</td>
<td>&#160;</td>
</tr>
<tr class="row-even"><td>-- weight</td>
<td>Relative weight of bucket
(Only defined for select groups)</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>-- watch_port</td>
<td>Port whose state affects whether this bucket is live
(Only required for fast failover groups)</td>
<td>4294967295</td>
<td>OFPP_ANY</td>
</tr>
<tr class="row-even"><td>-- watch_group</td>
<td>Group whose state affects whether this bucket is live
(Only required for fast failover groups)</td>
<td>4294967295</td>
<td>OFPG_ANY</td>
</tr>
<tr class="row-odd"><td>-- actions</td>
<td>0 or more actions associated with the bucket (list of dict)</td>
<td>[{&quot;type&quot;: &quot;OUTPUT&quot;, &quot;port&quot;: 1}]</td>
<td>[] #DROP</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;type&quot;: &quot;ALL&quot;,
    &quot;group_id&quot;: 1,
    &quot;buckets&quot;: [
        {
            &quot;actions&quot;: [
                {
                    &quot;type&quot;: &quot;OUTPUT&quot;,
                    &quot;port&quot;: 1
                }
            ]
        }
    ]
 }&#39; http://localhost:8080/stats/groupentry/add
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">To confirm group entry registration, please see <a class="reference internal" href="#get-group-description-stats"><span class="std std-ref">Get group description stats</span></a>.</p>
</div>
</div></blockquote>
</div>
<div class="section" id="modify-a-group-entry">
<h3><a class="toc-backref" href="#id41">Modify a group entry</a><a class="headerlink" href="#modify-a-group-entry" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Modify a group entry to the switch.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="22%" />
<col width="78%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>POST</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/groupentry/modify</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Request message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="13%" />
<col width="50%" />
<col width="27%" />
<col width="10%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID (int)</td>
<td>1</td>
<td>(Mandatory)</td>
</tr>
<tr class="row-odd"><td>type</td>
<td>One of OFPGT_* (string)</td>
<td>&quot;ALL&quot;</td>
<td>&quot;ALL&quot;</td>
</tr>
<tr class="row-even"><td>group_id</td>
<td>Group ID (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>buckets</td>
<td>struct ofp_bucket</td>
<td>&#160;</td>
<td>&#160;</td>
</tr>
<tr class="row-even"><td>-- weight</td>
<td>Relative weight of bucket
(Only defined for select groups)</td>
<td>0</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>-- watch_port</td>
<td>Port whose state affects whether this bucket is live
(Only required for fast failover groups)</td>
<td>4294967295</td>
<td>OFPP_ANY</td>
</tr>
<tr class="row-even"><td>-- watch_group</td>
<td>Group whose state affects whether this bucket is live
(Only required for fast failover groups)</td>
<td>4294967295</td>
<td>OFPG_ANY</td>
</tr>
<tr class="row-odd"><td>-- actions</td>
<td>0 or more actions associated with the bucket (list of dict)</td>
<td>[{&quot;type&quot;: &quot;OUTPUT&quot;, &quot;port&quot;: 1}]</td>
<td>[] #DROP</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;type&quot;: &quot;ALL&quot;,
    &quot;group_id&quot;: 1,
    &quot;buckets&quot;: [
        {
            &quot;actions&quot;: [
                {
                    &quot;type&quot;: &quot;OUTPUT&quot;,
                    &quot;port&quot;: 1
                }
            ]
        }
    ]
 }&#39; http://localhost:8080/stats/groupentry/modify
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="delete-a-group-entry">
<h3><a class="toc-backref" href="#id42">Delete a group entry</a><a class="headerlink" href="#delete-a-group-entry" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Delete a group entry to the switch.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="22%" />
<col width="78%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>POST</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/groupentry/delete</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Request message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="20%" />
<col width="44%" />
<col width="15%" />
<col width="22%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID (int)</td>
<td>1</td>
<td>(Mandatory)</td>
</tr>
<tr class="row-odd"><td>group_id</td>
<td>Group ID (int)</td>
<td>1</td>
<td>0</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;group_id&quot;: 1
 }&#39; http://localhost:8080/stats/groupentry/delete
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="modify-the-behavior-of-the-port">
<h3><a class="toc-backref" href="#id43">Modify the behavior of the port</a><a class="headerlink" href="#modify-the-behavior-of-the-port" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Modify the behavior of the physical port.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="23%" />
<col width="77%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>POST</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/portdesc/modify</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Request message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="15%" />
<col width="59%" />
<col width="11%" />
<col width="16%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID (int)</td>
<td>1</td>
<td>(Mandatory)</td>
</tr>
<tr class="row-odd"><td>port_no</td>
<td>Port number (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-even"><td>config</td>
<td>Bitmap of OFPPC_* flags (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>mask</td>
<td>Bitmap of OFPPC_* flags to be changed (int)</td>
<td>1</td>
<td>0</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;port_no&quot;: 1,
    &quot;config&quot;: 1,
    &quot;mask&quot;: 1
    }&#39; http://localhost:8080/stats/portdesc/modify
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">To confirm port description, please see <a class="reference internal" href="#get-ports-description"><span class="std std-ref">Get ports description</span></a>.</p>
</div>
</div></blockquote>
</div>
<div class="section" id="add-a-meter-entry">
<h3><a class="toc-backref" href="#id44">Add a meter entry</a><a class="headerlink" href="#add-a-meter-entry" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Add a meter entry to the switch.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="24%" />
<col width="76%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>POST</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/meterentry/add</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Request message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="47%" />
<col width="14%" />
<col width="18%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID (int)</td>
<td>1</td>
<td>(Mandatory)</td>
</tr>
<tr class="row-odd"><td>flags</td>
<td>Bitmap of OFPMF_* flags (list)</td>
<td>[&quot;KBPS&quot;]</td>
<td>[] #Empty</td>
</tr>
<tr class="row-even"><td>meter_id</td>
<td>Meter ID (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>bands</td>
<td>struct ofp_meter_band_header</td>
<td>&#160;</td>
<td>&#160;</td>
</tr>
<tr class="row-even"><td>-- type</td>
<td>One of OFPMBT_* (string)</td>
<td>&quot;DROP&quot;</td>
<td>None</td>
</tr>
<tr class="row-odd"><td>-- rate</td>
<td>Rate for this band (int)</td>
<td>1000</td>
<td>None</td>
</tr>
<tr class="row-even"><td>-- burst_size</td>
<td>Size of bursts (int)</td>
<td>100</td>
<td>None</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;flags&quot;: &quot;KBPS&quot;,
    &quot;meter_id&quot;: 1,
    &quot;bands&quot;: [
        {
            &quot;type&quot;: &quot;DROP&quot;,
            &quot;rate&quot;: 1000
        }
    ]
 }&#39; http://localhost:8080/stats/meterentry/add
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">To confirm meter entry registration, please see <a class="reference internal" href="#get-meter-config-stats"><span class="std std-ref">Get meter config stats</span></a>.</p>
</div>
</div></blockquote>
</div>
<div class="section" id="modify-a-meter-entry">
<h3><a class="toc-backref" href="#id45">Modify a meter entry</a><a class="headerlink" href="#modify-a-meter-entry" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Modify a meter entry to the switch.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="22%" />
<col width="78%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>POST</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/meterentry/modify</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Request message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="47%" />
<col width="14%" />
<col width="18%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID (int)</td>
<td>1</td>
<td>(Mandatory)</td>
</tr>
<tr class="row-odd"><td>flags</td>
<td>Bitmap of OFPMF_* flags (list)</td>
<td>[&quot;KBPS&quot;]</td>
<td>[] #Empty</td>
</tr>
<tr class="row-even"><td>meter_id</td>
<td>Meter ID (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>bands</td>
<td>struct ofp_meter_band_header</td>
<td>&#160;</td>
<td>&#160;</td>
</tr>
<tr class="row-even"><td>-- type</td>
<td>One of OFPMBT_* (string)</td>
<td>&quot;DROP&quot;</td>
<td>None</td>
</tr>
<tr class="row-odd"><td>-- rate</td>
<td>Rate for this band (int)</td>
<td>1000</td>
<td>None</td>
</tr>
<tr class="row-even"><td>-- burst_size</td>
<td>Size of bursts (int)</td>
<td>100</td>
<td>None</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;meter_id&quot;: 1,
    &quot;flags&quot;: &quot;KBPS&quot;,
    &quot;bands&quot;: [
        {
            &quot;type&quot;: &quot;DROP&quot;,
            &quot;rate&quot;: 1000
        }
    ]
 }&#39; http://localhost:8080/stats/meterentry/modify
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="delete-a-meter-entry">
<h3><a class="toc-backref" href="#id46">Delete a meter entry</a><a class="headerlink" href="#delete-a-meter-entry" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Delete a meter entry to the switch.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="22%" />
<col width="78%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>POST</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/meterentry/delete</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Request message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="22%" />
<col width="36%" />
<col width="18%" />
<col width="24%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID (int)</td>
<td>1</td>
<td>(Mandatory)</td>
</tr>
<tr class="row-odd"><td>meter_id</td>
<td>Meter ID (int)</td>
<td>1</td>
<td>0</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;meter_id&quot;: 1
 }&#39; http://localhost:8080/stats/meterentry/delete
</pre></div>
</div>
</div></blockquote>
</div>
<div class="section" id="modify-role">
<h3><a class="toc-backref" href="#id47">Modify role</a><a class="headerlink" href="#modify-role" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>modify the role of the switch.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="22%" />
<col width="78%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>POST</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/role</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Request message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="17%" />
<col width="43%" />
<col width="14%" />
<col width="26%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID (int)</td>
<td>1</td>
<td>(Mandatory)</td>
</tr>
<tr class="row-odd"><td>role</td>
<td>One of OFPCR_ROLE_*(string)</td>
<td>&quot;MASTER&quot;</td>
<td>OFPCR_ROLE_EQUAL</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;role&quot;: &quot;MASTER&quot;
 }&#39; http://localhost:8080/stats/role
</pre></div>
</div>
</div></blockquote>
</div>
</div>
<div class="section" id="support-for-experimenter-multipart">
<h2><a class="toc-backref" href="#id48">Support for experimenter multipart</a><a class="headerlink" href="#support-for-experimenter-multipart" title="Permalink to this headline">¶</a></h2>
<div class="section" id="send-a-experimenter-message">
<h3><a class="toc-backref" href="#id49">Send a experimenter message</a><a class="headerlink" href="#send-a-experimenter-message" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>Send a experimenter message to the switch which specified with Datapath ID in URI.</p>
<p>Usage:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="79%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Method</td>
<td>POST</td>
</tr>
<tr class="row-even"><td>URI</td>
<td>/stats/experimenter/&lt;dpid&gt;</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Request message body:</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="17%" />
<col width="57%" />
<col width="10%" />
<col width="16%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Attribute</th>
<th class="head">Description</th>
<th class="head">Example</th>
<th class="head">Default</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>dpid</td>
<td>Datapath ID (int)</td>
<td>1</td>
<td>(Mandatory)</td>
</tr>
<tr class="row-odd"><td>experimenter</td>
<td>Experimenter ID (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-even"><td>exp_type</td>
<td>Experimenter defined (int)</td>
<td>1</td>
<td>0</td>
</tr>
<tr class="row-odd"><td>data_type</td>
<td>Data format type (&quot;ascii&quot; or &quot;base64&quot;)</td>
<td>&quot;ascii&quot;</td>
<td>&quot;ascii&quot;</td>
</tr>
<tr class="row-even"><td>data</td>
<td>Data to send (string)</td>
<td>&quot;data&quot;</td>
<td>&quot;&quot; #Empty</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>Example of use:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;experimenter&quot;: 1,
    &quot;exp_type&quot;: 1,
    &quot;data_type&quot;: &quot;ascii&quot;,
    &quot;data&quot;: &quot;data&quot;
    }&#39; http://localhost:8080/stats/experimenter/1
</pre></div>
</div>
</div></blockquote>
</div>
</div>
<div class="section" id="reference-description-of-match-and-actions">
<span id="description-of-match-and-actions"></span><h2><a class="toc-backref" href="#id50">Reference: Description of Match and Actions</a><a class="headerlink" href="#reference-description-of-match-and-actions" title="Permalink to this headline">¶</a></h2>
<div class="section" id="description-of-match-on-request-messages">
<h3><a class="toc-backref" href="#id51">Description of Match on request messages</a><a class="headerlink" href="#description-of-match-on-request-messages" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>List of Match fields (OpenFlow1.0):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="14%" />
<col width="44%" />
<col width="42%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Match field</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>in_port</td>
<td>Input switch port (int)</td>
<td>{&quot;in_port&quot;: 7}</td>
</tr>
<tr class="row-odd"><td>dl_src</td>
<td>Ethernet source address (string)</td>
<td>{&quot;dl_src&quot;: &quot;aa:bb:cc:11:22:33&quot;}</td>
</tr>
<tr class="row-even"><td>dl_dst</td>
<td>Ethernet destination address (string)</td>
<td>{&quot;dl_dst&quot;: &quot;aa:bb:cc:11:22:33&quot;}</td>
</tr>
<tr class="row-odd"><td>dl_vlan</td>
<td>Input VLAN id (int)</td>
<td>{&quot;dl_vlan&quot;: 5}</td>
</tr>
<tr class="row-even"><td>dl_vlan_pcp</td>
<td>Input VLAN priority (int)</td>
<td>{&quot;dl_vlan_pcp&quot;: 3, &quot;dl_vlan&quot;: 3}</td>
</tr>
<tr class="row-odd"><td>dl_type</td>
<td>Ethernet frame type (int)</td>
<td>{&quot;dl_type&quot;: 123}</td>
</tr>
<tr class="row-even"><td>nw_tos</td>
<td>IP ToS (int)</td>
<td>{&quot;nw_tos&quot;: 16, &quot;dl_type&quot;: 2048}</td>
</tr>
<tr class="row-odd"><td>nw_proto</td>
<td>IP protocol or lower 8 bits of ARP opcode (int)</td>
<td>{&quot;nw_proto&quot;: 5, &quot;dl_type&quot;: 2048}</td>
</tr>
<tr class="row-even"><td>nw_src</td>
<td>IPv4 source address (string)</td>
<td>{&quot;nw_src&quot;: &quot;192.168.0.1&quot;, &quot;dl_type&quot;: 2048}</td>
</tr>
<tr class="row-odd"><td>nw_dst</td>
<td>IPv4 destination address (string)</td>
<td>{&quot;nw_dst&quot;: &quot;192.168.0.1/24&quot;, &quot;dl_type&quot;: 2048}</td>
</tr>
<tr class="row-even"><td>tp_src</td>
<td>TCP/UDP source port (int)</td>
<td>{&quot;tp_src&quot;: 1, &quot;nw_proto&quot;: 6, &quot;dl_type&quot;: 2048}</td>
</tr>
<tr class="row-odd"><td>tp_dst</td>
<td>TCP/UDP destination port (int)</td>
<td>{&quot;tp_dst&quot;: 2, &quot;nw_proto&quot;: 6, &quot;dl_type&quot;: 2048}</td>
</tr>
</tbody>
</table>
</div></blockquote>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>IPv4 address field can be described as IP Prefix like as follows.</p>
<p>IPv4 address:</p>
<div class="last highlight-default notranslate"><div class="highlight"><pre><span></span><span class="s2">&quot;192.168.0.1&quot;</span>
<span class="s2">&quot;192.168.0.2/24&quot;</span>
</pre></div>
</div>
</div>
<p>List of Match fields (OpenFlow1.2 or later):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="9%" />
<col width="30%" />
<col width="61%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Match field</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>in_port</td>
<td>Switch input port (int)</td>
<td>{&quot;in_port&quot;: 7}</td>
</tr>
<tr class="row-odd"><td>in_phy_port</td>
<td>Switch physical input port (int)</td>
<td>{&quot;in_phy_port&quot;: 5, &quot;in_port&quot;: 3}</td>
</tr>
<tr class="row-even"><td>metadata</td>
<td>Metadata passed between tables (int or string)</td>
<td>{&quot;metadata&quot;: 12345} or {&quot;metadata&quot;: &quot;0x1212/0xffff&quot;}</td>
</tr>
<tr class="row-odd"><td>eth_dst</td>
<td>Ethernet destination address (string)</td>
<td>{&quot;eth_dst&quot;: &quot;aa:bb:cc:11:22:33/00:00:00:00:ff:ff&quot;}</td>
</tr>
<tr class="row-even"><td>eth_src</td>
<td>Ethernet source address (string)</td>
<td>{&quot;eth_src&quot;: &quot;aa:bb:cc:11:22:33&quot;}</td>
</tr>
<tr class="row-odd"><td>eth_type</td>
<td>Ethernet frame type (int)</td>
<td>{&quot;eth_type&quot;: 2048}</td>
</tr>
<tr class="row-even"><td>vlan_vid</td>
<td>VLAN id (int or string)</td>
<td>See <a class="reference internal" href="#example-of-vlan-id-match-field"><span class="std std-ref">Example of VLAN ID match field</span></a></td>
</tr>
<tr class="row-odd"><td>vlan_pcp</td>
<td>VLAN priority (int)</td>
<td>{&quot;vlan_pcp&quot;: 3, &quot;vlan_vid&quot;: 3}</td>
</tr>
<tr class="row-even"><td>ip_dscp</td>
<td>IP DSCP (6 bits in ToS field) (int)</td>
<td>{&quot;ip_dscp&quot;: 3, &quot;eth_type&quot;: 2048}</td>
</tr>
<tr class="row-odd"><td>ip_ecn</td>
<td>IP ECN (2 bits in ToS field) (int)</td>
<td>{&quot;ip_ecn&quot;: 0, &quot;eth_type&quot;: 34525}</td>
</tr>
<tr class="row-even"><td>ip_proto</td>
<td>IP protocol (int)</td>
<td>{&quot;ip_proto&quot;: 5, &quot;eth_type&quot;: 34525}</td>
</tr>
<tr class="row-odd"><td>ipv4_src</td>
<td>IPv4 source address (string)</td>
<td>{&quot;ipv4_src&quot;: &quot;192.168.0.1&quot;, &quot;eth_type&quot;: 2048}</td>
</tr>
<tr class="row-even"><td>ipv4_dst</td>
<td>IPv4 destination address (string)</td>
<td>{&quot;ipv4_dst&quot;: &quot;192.168.10.10/255.255.255.0&quot;, &quot;eth_type&quot;: 2048}</td>
</tr>
<tr class="row-odd"><td>tcp_src</td>
<td>TCP source port (int)</td>
<td>{&quot;tcp_src&quot;: 3, &quot;ip_proto&quot;: 6, &quot;eth_type&quot;: 2048}</td>
</tr>
<tr class="row-even"><td>tcp_dst</td>
<td>TCP destination port (int)</td>
<td>{&quot;tcp_dst&quot;: 5, &quot;ip_proto&quot;: 6, &quot;eth_type&quot;: 2048}</td>
</tr>
<tr class="row-odd"><td>udp_src</td>
<td>UDP source port (int)</td>
<td>{&quot;udp_src&quot;: 2, &quot;ip_proto&quot;: 17, &quot;eth_type&quot;: 2048}</td>
</tr>
<tr class="row-even"><td>udp_dst</td>
<td>UDP destination port (int)</td>
<td>{&quot;udp_dst&quot;: 6, &quot;ip_proto&quot;: 17, &quot;eth_type&quot;: 2048}</td>
</tr>
<tr class="row-odd"><td>sctp_src</td>
<td>SCTP source port (int)</td>
<td>{&quot;sctp_src&quot;: 99, &quot;ip_proto&quot;: 132, &quot;eth_type&quot;: 2048}</td>
</tr>
<tr class="row-even"><td>sctp_dst</td>
<td>SCTP destination port (int)</td>
<td>{&quot;sctp_dst&quot;: 99, &quot;ip_proto&quot;: 132, &quot;eth_type&quot;: 2048}</td>
</tr>
<tr class="row-odd"><td>icmpv4_type</td>
<td>ICMP type (int)</td>
<td>{&quot;icmpv4_type&quot;: 5, &quot;ip_proto&quot;: 1, &quot;eth_type&quot;: 2048}</td>
</tr>
<tr class="row-even"><td>icmpv4_code</td>
<td>ICMP code (int)</td>
<td>{&quot;icmpv4_code&quot;: 6, &quot;ip_proto&quot;: 1, &quot;eth_type&quot;: 2048}</td>
</tr>
<tr class="row-odd"><td>arp_op</td>
<td>ARP opcode (int)</td>
<td>{&quot;arp_op&quot;: 3, &quot;eth_type&quot;: 2054}</td>
</tr>
<tr class="row-even"><td>arp_spa</td>
<td>ARP source IPv4 address (string)</td>
<td>{&quot;arp_spa&quot;: &quot;192.168.0.11&quot;, &quot;eth_type&quot;: 2054}</td>
</tr>
<tr class="row-odd"><td>arp_tpa</td>
<td>ARP target IPv4 address (string)</td>
<td>{&quot;arp_tpa&quot;: &quot;192.168.0.44/24&quot;, &quot;eth_type&quot;: 2054}</td>
</tr>
<tr class="row-even"><td>arp_sha</td>
<td>ARP source hardware address (string)</td>
<td>{&quot;arp_sha&quot;: &quot;aa:bb:cc:11:22:33&quot;, &quot;eth_type&quot;: 2054}</td>
</tr>
<tr class="row-odd"><td>arp_tha</td>
<td>ARP target hardware address (string)</td>
<td>{&quot;arp_tha&quot;: &quot;aa:bb:cc:11:22:33/00:00:00:00:ff:ff&quot;, &quot;eth_type&quot;: 2054}</td>
</tr>
<tr class="row-even"><td>ipv6_src</td>
<td>IPv6 source address (string)</td>
<td>{&quot;ipv6_src&quot;: &quot;2001::aaaa:bbbb:cccc:1111&quot;, &quot;eth_type&quot;: 34525}</td>
</tr>
<tr class="row-odd"><td>ipv6_dst</td>
<td>IPv6 destination address (string)</td>
<td>{&quot;ipv6_dst&quot;: &quot;2001::ffff:cccc:bbbb:1111/64&quot;, &quot;eth_type&quot;: 34525}</td>
</tr>
<tr class="row-even"><td>ipv6_flabel</td>
<td>IPv6 Flow Label (int)</td>
<td>{&quot;ipv6_flabel&quot;: 2, &quot;eth_type&quot;: 34525}</td>
</tr>
<tr class="row-odd"><td>icmpv6_type</td>
<td>ICMPv6 type (int)</td>
<td>{&quot;icmpv6_type&quot;: 3, &quot;ip_proto&quot;: 58, &quot;eth_type&quot;: 34525}</td>
</tr>
<tr class="row-even"><td>icmpv6_code</td>
<td>ICMPv6 code (int)</td>
<td>{&quot;icmpv6_code&quot;: 4, &quot;ip_proto&quot;: 58, &quot;eth_type&quot;: 34525}</td>
</tr>
<tr class="row-odd"><td>ipv6_nd_target</td>
<td>Target address for Neighbor Discovery (string)</td>
<td>{&quot;ipv6_nd_target&quot;: &quot;2001::ffff:cccc:bbbb:1111&quot;, &quot;icmpv6_type&quot;: 135, &quot;ip_proto&quot;: 58, &quot;eth_type&quot;: 34525}</td>
</tr>
<tr class="row-even"><td>ipv6_nd_sll</td>
<td>Source link-layer for Neighbor Discovery (string)</td>
<td>{&quot;ipv6_nd_sll&quot;: &quot;aa:bb:cc:11:22:33&quot;, &quot;icmpv6_type&quot;: 135, &quot;ip_proto&quot;: 58, &quot;eth_type&quot;: 34525}</td>
</tr>
<tr class="row-odd"><td>ipv6_nd_tll</td>
<td>Target link-layer for Neighbor Discovery (string)</td>
<td>{&quot;ipv6_nd_tll&quot;: &quot;aa:bb:cc:11:22:33&quot;, &quot;icmpv6_type&quot;: 136, &quot;ip_proto&quot;: 58, &quot;eth_type&quot;: 34525}</td>
</tr>
<tr class="row-even"><td>mpls_label</td>
<td>MPLS label (int)</td>
<td>{&quot;mpls_label&quot;: 3, &quot;eth_type&quot;: 34888}</td>
</tr>
<tr class="row-odd"><td>mpls_tc</td>
<td>MPLS Traffic Class (int)</td>
<td>{&quot;mpls_tc&quot;: 2, &quot;eth_type&quot;: 34888}</td>
</tr>
<tr class="row-even"><td>mpls_bos</td>
<td>MPLS BoS bit (int)
(Openflow1.3+)</td>
<td>{&quot;mpls_bos&quot;: 1, &quot;eth_type&quot;: 34888}</td>
</tr>
<tr class="row-odd"><td>pbb_isid</td>
<td>PBB I-SID (int or string)
(Openflow1.3+)</td>
<td>{&quot;pbb_isid&quot;: 5, &quot;eth_type&quot;: 35047} or{&quot;pbb_isid&quot;: &quot;0x05/0xff&quot;, &quot;eth_type&quot;: 35047}</td>
</tr>
<tr class="row-even"><td>tunnel_id</td>
<td>Logical Port Metadata (int or string)
(Openflow1.3+)</td>
<td>{&quot;tunnel_id&quot;: 7} or {&quot;tunnel_id&quot;: &quot;0x07/0xff&quot;}</td>
</tr>
<tr class="row-odd"><td>ipv6_exthdr</td>
<td>IPv6 Extension Header pseudo-field (int or string)
(Openflow1.3+)</td>
<td>{&quot;ipv6_exthdr&quot;: 3, &quot;eth_type&quot;: 34525} or {&quot;ipv6_exthdr&quot;: &quot;0x40/0x1F0&quot;, &quot;eth_type&quot;: 34525}</td>
</tr>
<tr class="row-even"><td>pbb_uca</td>
<td>PBB UCA hander field(int)
(Openflow1.4+)</td>
<td>{&quot;pbb_uca&quot;: 1, &quot;eth_type&quot;: 35047}</td>
</tr>
<tr class="row-odd"><td>tcp_flags</td>
<td>TCP flags(int)
(Openflow1.5+)</td>
<td>{&quot;tcp_flags&quot;: 2, &quot;ip_proto&quot;: 6, &quot;eth_type&quot;: 2048}</td>
</tr>
<tr class="row-even"><td>actset_output</td>
<td>Output port from action set metadata(int)
(Openflow1.5+)</td>
<td>{&quot;actset_output&quot;: 3}</td>
</tr>
<tr class="row-odd"><td>packet_type</td>
<td>Packet type value(int)
(Openflow1.5+)</td>
<td>{&quot;packet_type&quot;: [1, 2048]}</td>
</tr>
</tbody>
</table>
</div></blockquote>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>Some field can be described with mask like as follows.</p>
<p>Ethernet address:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="s2">&quot;aa:bb:cc:11:22:33&quot;</span>
<span class="s2">&quot;aa:bb:cc:11:22:33/00:00:00:00:ff:ff&quot;</span>
</pre></div>
</div>
<p>IPv4 address:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="s2">&quot;192.168.0.11&quot;</span>
<span class="s2">&quot;192.168.0.44/24&quot;</span>
<span class="s2">&quot;192.168.10.10/255.255.255.0&quot;</span>
</pre></div>
</div>
<p>IPv6 address:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="s2">&quot;2001::ffff:cccc:bbbb:1111&quot;</span>
<span class="s2">&quot;2001::ffff:cccc:bbbb:2222/64&quot;</span>
<span class="s2">&quot;2001::ffff:cccc:bbbb:2222/ffff:ffff:ffff:ffff::0&quot;</span>
</pre></div>
</div>
<p>Metadata:</p>
<div class="last highlight-default notranslate"><div class="highlight"><pre><span></span><span class="s2">&quot;0x1212121212121212&quot;</span>
<span class="s2">&quot;0x3434343434343434/0x01010101010101010&quot;</span>
</pre></div>
</div>
</div>
</div></blockquote>
<div class="section" id="example-of-vlan-id-match-field">
<span id="id8"></span><h4>Example of VLAN ID match field<a class="headerlink" href="#example-of-vlan-id-match-field" title="Permalink to this headline">¶</a></h4>
<blockquote>
<div><p>The following is available in OpenFlow1.0 or later.</p>
<ul>
<li><p class="first">To match only packets with VLAN tag and VLAN ID equal value 5:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;match&quot;:{
        &quot;dl_vlan&quot;: 5
    },
    &quot;actions&quot;:[
        {
            &quot;type&quot;:&quot;OUTPUT&quot;,
            &quot;port&quot;: 1
        }
    ]
 }&#39; http://localhost:8080/stats/flowentry/add
</pre></div>
</div>
</li>
</ul>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">When &quot;dl_vlan&quot; field is described as decimal int value, OFPVID_PRESENT(0x1000) bit is automatically applied.</p>
</div>
<p>The following is available in OpenFlow1.2 or later.</p>
<ul>
<li><p class="first">To match only packets without a VLAN tag:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;match&quot;:{
        &quot;dl_vlan&quot;: &quot;0x0000&quot;   # Describe OFPVID_NONE(0x0000)
    },
    &quot;actions&quot;:[
        {
            &quot;type&quot;:&quot;OUTPUT&quot;,
            &quot;port&quot;: 1
        }
    ]
 }&#39; http://localhost:8080/stats/flowentry/add
</pre></div>
</div>
</li>
<li><p class="first">To match only packets with a VLAN tag regardless of its value:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;match&quot;:{
        &quot;dl_vlan&quot;: &quot;0x1000/0x1000&quot;   # Describe OFPVID_PRESENT(0x1000/0x1000)
    },
    &quot;actions&quot;:[
        {
            &quot;type&quot;:&quot;OUTPUT&quot;,
            &quot;port&quot;: 1
        }
    ]
 }&#39; http://localhost:8080/stats/flowentry/add
</pre></div>
</div>
</li>
<li><p class="first">To match only packets with VLAN tag and VLAN ID equal value 5:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;match&quot;:{
        &quot;dl_vlan&quot;: &quot;0x1005&quot;   # Describe sum of VLAN-ID(e.g. 5) | OFPVID_PRESENT(0x1000)
    },
    &quot;actions&quot;:[
        {
            &quot;type&quot;:&quot;OUTPUT&quot;,
            &quot;port&quot;: 1
        }
    ]
 }&#39; http://localhost:8080/stats/flowentry/add
</pre></div>
</div>
</li>
</ul>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">When using the descriptions for OpenFlow1.2 or later, please describe &quot;dl_vlan&quot; field as hexadecimal string value,
and OFPVID_PRESENT(0x1000) bit is NOT automatically applied.</p>
</div>
</div></blockquote>
</div>
</div>
<div class="section" id="description-of-actions-on-request-messages">
<h3><a class="toc-backref" href="#id52">Description of Actions on request messages</a><a class="headerlink" href="#description-of-actions-on-request-messages" title="Permalink to this headline">¶</a></h3>
<blockquote>
<div><p>List of Actions (OpenFlow1.0):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="10%" />
<col width="52%" />
<col width="37%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Actions</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>OUTPUT</td>
<td>Output packet from &quot;port&quot;</td>
<td>{&quot;type&quot;: &quot;OUTPUT&quot;, &quot;port&quot;: 3}</td>
</tr>
<tr class="row-odd"><td>SET_VLAN_VID</td>
<td>Set the 802.1Q VLAN ID using &quot;vlan_vid&quot;</td>
<td>{&quot;type&quot;: &quot;SET_VLAN_VID&quot;, &quot;vlan_vid&quot;: 5}</td>
</tr>
<tr class="row-even"><td>SET_VLAN_PCP</td>
<td>Set the 802.1Q priority using &quot;vlan_pcp&quot;</td>
<td>{&quot;type&quot;: &quot;SET_VLAN_PCP&quot;, &quot;vlan_pcp&quot;: 3}</td>
</tr>
<tr class="row-odd"><td>STRIP_VLAN</td>
<td>Strip the 802.1Q header</td>
<td>{&quot;type&quot;: &quot;STRIP_VLAN&quot;}</td>
</tr>
<tr class="row-even"><td>SET_DL_SRC</td>
<td>Set ethernet source address using &quot;dl_src&quot;</td>
<td>{&quot;type&quot;: &quot;SET_DL_SRC&quot;, &quot;dl_src&quot;: &quot;aa:bb:cc:11:22:33&quot;}</td>
</tr>
<tr class="row-odd"><td>SET_DL_DST</td>
<td>Set ethernet destination address using &quot;dl_dst&quot;</td>
<td>{&quot;type&quot;: &quot;SET_DL_DST&quot;, &quot;dl_dst&quot;: &quot;aa:bb:cc:11:22:33&quot;}</td>
</tr>
<tr class="row-even"><td>SET_NW_SRC</td>
<td>IP source address using &quot;nw_src&quot;</td>
<td>{&quot;type&quot;: &quot;SET_NW_SRC&quot;, &quot;nw_src&quot;: &quot;10.0.0.1&quot;}</td>
</tr>
<tr class="row-odd"><td>SET_NW_DST</td>
<td>IP destination address using &quot;nw_dst&quot;</td>
<td>{&quot;type&quot;: &quot;SET_NW_DST&quot;, &quot;nw_dst&quot;: &quot;10.0.0.1&quot;}</td>
</tr>
<tr class="row-even"><td>SET_NW_TOS</td>
<td>Set IP ToS (DSCP field, 6 bits) using &quot;nw_tos&quot;</td>
<td>{&quot;type&quot;: &quot;SET_NW_TOS&quot;, &quot;nw_tos&quot;: 184}</td>
</tr>
<tr class="row-odd"><td>SET_TP_SRC</td>
<td>Set TCP/UDP source port using &quot;tp_src&quot;</td>
<td>{&quot;type&quot;: &quot;SET_TP_SRC&quot;, &quot;tp_src&quot;: 8080}</td>
</tr>
<tr class="row-even"><td>SET_TP_DST</td>
<td>Set TCP/UDP destination port using &quot;tp_dst&quot;</td>
<td>{&quot;type&quot;: &quot;SET_TP_DST&quot;, &quot;tp_dst&quot;: 8080}</td>
</tr>
<tr class="row-odd"><td>ENQUEUE</td>
<td>Output to queue with &quot;queue_id&quot; attached to &quot;port&quot;</td>
<td>{&quot;type&quot;: &quot;ENQUEUE&quot;, &quot;queue_id&quot;: 3, &quot;port&quot;: 1}</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>List of Actions (OpenFlow1.2 or later):</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="7%" />
<col width="36%" />
<col width="57%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Actions</th>
<th class="head">Description</th>
<th class="head">Example</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>OUTPUT</td>
<td>Output packet from &quot;port&quot;</td>
<td>{&quot;type&quot;: &quot;OUTPUT&quot;, &quot;port&quot;: 3}</td>
</tr>
<tr class="row-odd"><td>COPY_TTL_OUT</td>
<td>Copy TTL outwards</td>
<td>{&quot;type&quot;: &quot;COPY_TTL_OUT&quot;}</td>
</tr>
<tr class="row-even"><td>COPY_TTL_IN</td>
<td>Copy TTL inwards</td>
<td>{&quot;type&quot;: &quot;COPY_TTL_IN&quot;}</td>
</tr>
<tr class="row-odd"><td>SET_MPLS_TTL</td>
<td>Set MPLS TTL using &quot;mpls_ttl&quot;</td>
<td>{&quot;type&quot;: &quot;SET_MPLS_TTL&quot;, &quot;mpls_ttl&quot;: 64}</td>
</tr>
<tr class="row-even"><td>DEC_MPLS_TTL</td>
<td>Decrement MPLS TTL</td>
<td>{&quot;type&quot;: &quot;DEC_MPLS_TTL&quot;}</td>
</tr>
<tr class="row-odd"><td>PUSH_VLAN</td>
<td>Push a new VLAN tag with &quot;ethertype&quot;</td>
<td>{&quot;type&quot;: &quot;PUSH_VLAN&quot;, &quot;ethertype&quot;: 33024}</td>
</tr>
<tr class="row-even"><td>POP_VLAN</td>
<td>Pop the outer VLAN tag</td>
<td>{&quot;type&quot;: &quot;POP_VLAN&quot;}</td>
</tr>
<tr class="row-odd"><td>PUSH_MPLS</td>
<td>Push a new MPLS tag with &quot;ethertype&quot;</td>
<td>{&quot;type&quot;: &quot;PUSH_MPLS&quot;, &quot;ethertype&quot;: 34887}</td>
</tr>
<tr class="row-even"><td>POP_MPLS</td>
<td>Pop the outer MPLS tag with &quot;ethertype&quot;</td>
<td>{&quot;type&quot;: &quot;POP_MPLS&quot;, &quot;ethertype&quot;: 2054}</td>
</tr>
<tr class="row-odd"><td>SET_QUEUE</td>
<td>Set queue id using &quot;queue_id&quot; when outputting to a port</td>
<td>{&quot;type&quot;: &quot;SET_QUEUE&quot;, &quot;queue_id&quot;: 7}</td>
</tr>
<tr class="row-even"><td>GROUP</td>
<td>Apply group identified by &quot;group_id&quot;</td>
<td>{&quot;type&quot;: &quot;GROUP&quot;, &quot;group_id&quot;: 5}</td>
</tr>
<tr class="row-odd"><td>SET_NW_TTL</td>
<td>Set IP TTL using &quot;nw_ttl&quot;</td>
<td>{&quot;type&quot;: &quot;SET_NW_TTL&quot;, &quot;nw_ttl&quot;: 64}</td>
</tr>
<tr class="row-even"><td>DEC_NW_TTL</td>
<td>Decrement IP TTL</td>
<td>{&quot;type&quot;: &quot;DEC_NW_TTL&quot;}</td>
</tr>
<tr class="row-odd"><td>SET_FIELD</td>
<td>Set a &quot;field&quot; using &quot;value&quot;
(The set of keywords available for &quot;field&quot; is the same as match field)</td>
<td>See <a class="reference internal" href="#example-of-set-field-action"><span class="std std-ref">Example of set-field action</span></a></td>
</tr>
<tr class="row-even"><td>PUSH_PBB</td>
<td>Push a new PBB service tag with &quot;ethertype&quot;
(Openflow1.3+)</td>
<td>{&quot;type&quot;: &quot;PUSH_PBB&quot;, &quot;ethertype&quot;: 35047}</td>
</tr>
<tr class="row-odd"><td>POP_PBB</td>
<td>Pop the outer PBB service tag
(Openflow1.3+)</td>
<td>{&quot;type&quot;: &quot;POP_PBB&quot;}</td>
</tr>
<tr class="row-even"><td>COPY_FIELD</td>
<td>Copy value between header and register
(Openflow1.5+)</td>
<td>{&quot;type&quot;: &quot;COPY_FIELD&quot;, &quot;n_bits&quot;: 32, &quot;src_offset&quot;: 1, &quot;dst_offset&quot;: 2, &quot;src_oxm_id&quot;: &quot;eth_src&quot;, &quot;dst_oxm_id&quot;: &quot;eth_dst&quot;}</td>
</tr>
<tr class="row-odd"><td>METER</td>
<td>Apply meter identified by &quot;meter_id&quot;
(Openflow1.5+)</td>
<td>{&quot;type&quot;: &quot;METER&quot;, &quot;meter_id&quot;: 3}</td>
</tr>
<tr class="row-even"><td>EXPERIMENTER</td>
<td>Extensible action for the experimenter
(Set &quot;base64&quot; or &quot;ascii&quot; to &quot;data_type&quot; field)</td>
<td>{&quot;type&quot;: &quot;EXPERIMENTER&quot;, &quot;experimenter&quot;: 101, &quot;data&quot;: &quot;AAECAwQFBgc=&quot;, &quot;data_type&quot;: &quot;base64&quot;}</td>
</tr>
<tr class="row-odd"><td>GOTO_TABLE</td>
<td>(Instruction) Setup the next table identified by &quot;table_id&quot;</td>
<td>{&quot;type&quot;: &quot;GOTO_TABLE&quot;, &quot;table_id&quot;: 8}</td>
</tr>
<tr class="row-even"><td>WRITE_METADATA</td>
<td>(Instruction) Setup the metadata field using &quot;metadata&quot; and &quot;metadata_mask&quot;</td>
<td>{&quot;type&quot;: &quot;WRITE_METADATA&quot;, &quot;metadata&quot;: 0x3, &quot;metadata_mask&quot;: 0x3}</td>
</tr>
<tr class="row-odd"><td>METER</td>
<td>(Instruction) Apply meter identified by &quot;meter_id&quot;
(deprecated in Openflow1.5)</td>
<td>{&quot;type&quot;: &quot;METER&quot;, &quot;meter_id&quot;: 3}</td>
</tr>
<tr class="row-even"><td>WRITE_ACTIONS</td>
<td>(Instruction) Write the action(s) onto the datapath action set</td>
<td>{&quot;type&quot;: &quot;WRITE_ACTIONS&quot;, actions&quot;:[{&quot;type&quot;:&quot;POP_VLAN&quot;,},{ &quot;type&quot;:&quot;OUTPUT&quot;, &quot;port&quot;: 2}]}</td>
</tr>
<tr class="row-odd"><td>CLEAR_ACTIONS</td>
<td>(Instruction) Clears all actions from the datapath action set</td>
<td>{&quot;type&quot;: &quot;CLEAR_ACTIONS&quot;}</td>
</tr>
</tbody>
</table>
</div></blockquote>
</div></blockquote>
<div class="section" id="example-of-set-field-action">
<span id="id9"></span><h4>Example of set-field action<a class="headerlink" href="#example-of-set-field-action" title="Permalink to this headline">¶</a></h4>
<blockquote>
<div><p>To set VLAN ID to non-VLAN-tagged frame:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl -X POST -d &#39;{
    &quot;dpid&quot;: 1,
    &quot;match&quot;:{
        &quot;dl_type&quot;: &quot;0x8000&quot;
    },
    &quot;actions&quot;:[
        {
            &quot;type&quot;: &quot;PUSH_VLAN&quot;,     # Push a new VLAN tag if a input frame is non-VLAN-tagged
            &quot;ethertype&quot;: 33024       # Ethertype 0x8100(=33024): IEEE 802.1Q VLAN-tagged frame
        },
        {
            &quot;type&quot;: &quot;SET_FIELD&quot;,
            &quot;field&quot;: &quot;vlan_vid&quot;,     # Set VLAN ID
            &quot;value&quot;: 4102            # Describe sum of vlan_id(e.g. 6) | OFPVID_PRESENT(0x1000=4096)
        },
        {
            &quot;type&quot;: &quot;OUTPUT&quot;,
            &quot;port&quot;: 2
        }
    ]
 }&#39; http://localhost:8080/stats/flowentry/add
</pre></div>
</div>
</div></blockquote>
</div>
</div>
</div>
</div>


           </div>
           
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="rest_vtep.html" class="btn btn-neutral float-right" title="ryu.app.rest_vtep" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="ofctl.html" class="btn btn-neutral float-left" title="ryu.app.ofctl" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2011-2014 Nippon Telegraph and Telephone Corporation
      
        <span class="commit">
          Revision <code>d6cda4f4</code>.
        </span>
      

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  

  



  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
   

</body>
</html>